home *** CD-ROM | disk | FTP | other *** search
/ Giga Games 1 / Giga Games.iso / net / usenet / volume7 / nethack3 / patch7j < prev    next >
Encoding:
Internet Message Format  |  1990-02-26  |  60.3 KB

  1. Path: uunet!zephyr.ens.tek.com!tekred!saab!billr
  2. From: billr@saab.CNA.TEK.COM (Bill Randle)
  3. Newsgroups: comp.sources.games
  4. Subject: v09i010:  NetHack3 -  display oriented dungeons & dragons (Ver. 3.0), Patch7j
  5. Message-ID: <5224@tekred.CNA.TEK.COM>
  6. Date: 24 Feb 90 00:36:04 GMT
  7. Sender: news@tekred.CNA.TEK.COM
  8. Lines: 2380
  9. Approved: billr@saab.CNA.TEK.COM
  10.  
  11. Submitted-by: Izchak Miller <izchak@linc.cis.upenn.edu>
  12. Posting-number: Volume 9, Issue 10
  13. Archive-name: NetHack3/Patch7j
  14. Patch-To: NetHack3: Volume 7, Issue 56-93
  15.  
  16.  
  17.  
  18. #! /bin/sh
  19. # This is a shell archive.  Remove anything before this line, then unpack
  20. # it by saving it into a file and typing "sh file".  To overwrite existing
  21. # files, type "sh file -c".  You can also feed this as standard input via
  22. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  23. # will see the following message at the end:
  24. #        "End of archive 10 (of 30)."
  25. # Contents:  amiga/ami.lnk patch7.11
  26. # Wrapped by billr@saab on Wed Feb 21 10:04:31 1990
  27. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  28. if test -f 'amiga/ami.lnk' -a "${1}" != "-c" ; then 
  29.   echo shar: Renaming existing file \"'amiga/ami.lnk'\" to \"'amiga/ami.lnk.orig'\"
  30.   mv -f 'amiga/ami.lnk' 'amiga/ami.lnk.orig'
  31. fi
  32. echo shar: Extracting \"'amiga/ami.lnk'\" \(1526 characters\)
  33. sed "s/^X//" >'amiga/ami.lnk' <<'END_OF_FILE'
  34. X    O_Src1:allmain.o    O_Src1:alloc.o        O_Src1:apply.o
  35. X    O_Src1:artifact.o    O_Src1:attrib.o        O_Src1:bones.o
  36. X    O_Src1:cmd.o        O_Src1:dbridge.o    O_Src1:decl.o
  37. X    O_Src1:demon.o        O_Src1:do.o        O_Src1:do_name.o
  38. X    O_Src1:do_wear.o    O_Src1:dog.o        O_Src1:dogmove.o
  39. X    O_Src1:dokick.o        O_Src1:dothrow.o    O_Src1:eat.o
  40. X    O_Src1:end.o        O_Src1:engrave.o    O_Src1:exper.o
  41. X    O_Src1:extralev.o    O_Src1:fountain.o    O_Src1:getline.o
  42. X    O_Src1:hack.o        O_Src1:invent.o        O_Src1:lock.o
  43. X
  44. X    O_Src2:mail.o        O_Src2:makemon.o    O_Src2:mcastu.o
  45. X    O_Src2:mhitm.o        O_Src2:mhitu.o        O_Src2:mklev.o
  46. X    O_Src2:mkmaze.o        O_Src2:mkobj.o        O_Src2:mkroom.o
  47. X    O_Src2:mon.o        O_Src2:mondata.o    O_Src2:monmove.o
  48. X    O_Src2:monst.o        O_Src2:mthrowu.o    O_Src2:music.o
  49. X    O_Src2:o_init.o        O_Src2:objects.o    O_Src2:objnam.o
  50. X    O_Src2:options.o    O_Src2:pager.o        O_Src2:pickup.o
  51. X    O_Src2:polyself.o    O_Src2:potion.o
  52. X
  53. X    O_Src3:pray.o        O_Src3:pri.o        O_Src3:priest.o
  54. X    O_Src3:prisym.o        O_Src3:read.o        O_Src3:restore.o
  55. X    O_Src3:rip.o        O_Src3:rnd.o        O_Src3:rumors.o
  56. X    O_Src3:save.o        O_Src3:search.o        O_Src3:shk.o
  57. X    O_Src3:shknam.o        O_Src3:sit.o        O_Src3:sounds.o
  58. X    O_Src3:sp_lev.o        O_Src3:spell.o        O_Src3:steal.o
  59. X    O_Src3:timeout.o    O_Src3:topl.o        O_Src3:topten.o
  60. X    O_Src3:track.o        O_Src3:trap.o        O_Src3:u_init.o
  61. X    O_Src3:uhitm.o        O_Src3:vault.o        O_Src3:version.o
  62. X    O_Src3:weapon.o        O_Src3:were.o        O_Src3:wield.o
  63. X    O_Src3:wizard.o        O_Src3:worm.o        O_Src3:worn.o
  64. X    O_Src3:write.o        O_Src3:zap.o
  65. X
  66. X    O_Amiga:amidos.o    O_Amiga:amitcap.o    O_Amiga:amitty.o
  67. X    O_Amiga:amiunix.o    O_Amiga:amiwbench.o    O_Amiga:amiwind.o
  68. X
  69. X    O_Others:pcmain.o    O_Others:random.o
  70. END_OF_FILE
  71. if test 1526 -ne `wc -c <'amiga/ami.lnk'`; then
  72.     echo shar: \"'amiga/ami.lnk'\" unpacked with wrong size!
  73. fi
  74. # end of 'amiga/ami.lnk'
  75. if test -f 'patch7.11' -a "${1}" != "-c" ; then 
  76.   echo shar: Renaming existing file \"'patch7.11'\" to \"'patch7.11.orig'\"
  77.   mv -f 'patch7.11' 'patch7.11.orig'
  78. fi
  79. echo shar: Extracting \"'patch7.11'\" \(55515 characters\)
  80. sed "s/^X//" >'patch7.11' <<'END_OF_FILE'
  81. X*** src/Old/mhitu.c    Mon Feb 19 20:29:10 1990
  82. X--- src/mhitu.c    Wed Feb 14 18:38:22 1990
  83. X***************
  84. X*** 1,4 ****
  85. X! /*    SCCS Id: @(#)mhitu.c    3.0    89/11/15
  86. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  87. X  /* NetHack may be freely redistributed.  See license for details. */
  88. X  
  89. X--- 1,4 ----
  90. X! /*    SCCS Id: @(#)mhitu.c    3.0    89/11/27
  91. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  92. X  /* NetHack may be freely redistributed.  See license for details. */
  93. X  
  94. X***************
  95. X*** 7,25 ****
  96. X  #  include "artifact.h"
  97. X  #endif
  98. X  
  99. X! static struct obj *otmp;
  100. X  #ifdef POLYSELF
  101. X! static void FDECL(urustm, (struct monst *, struct obj *));
  102. X! static int FDECL(passiveum, (struct permonst *, struct monst *));
  103. X  #endif
  104. X  #ifdef SEDUCE
  105. X! static void FDECL(mayberem, (struct obj *, char *));
  106. X  #endif
  107. X! static int FDECL(hitmu, (struct monst *,struct attack *));
  108. X! static int FDECL(gulpmu, (struct monst *,struct attack *));
  109. X! static int FDECL(explmu, (struct monst *,struct attack *));
  110. X! static int FDECL(gazemu, (struct monst *,struct attack *));
  111. X  
  112. X  
  113. X  static void
  114. X  hitmsg(mtmp, mattk)
  115. X--- 7,33 ----
  116. X  #  include "artifact.h"
  117. X  #endif
  118. X  
  119. X! VSTATIC struct obj *otmp;
  120. X! 
  121. X  #ifdef POLYSELF
  122. X! OSTATIC void FDECL(urustm, (struct monst *, struct obj *));
  123. X! static int FDECL(passiveum, (struct permonst *,struct monst *,struct attack *));
  124. X  #endif
  125. X  #ifdef SEDUCE
  126. X! static void FDECL(mayberem, (struct obj *, const char *));
  127. X  #endif
  128. X! OSTATIC int FDECL(hitmu, (struct monst *,struct attack *));
  129. X! OSTATIC int FDECL(gulpmu, (struct monst *,struct attack *));
  130. X! OSTATIC int FDECL(explmu, (struct monst *,struct attack *));
  131. X! OSTATIC int FDECL(gazemu, (struct monst *,struct attack *));
  132. X! static void FDECL(hitmsg,(struct monst *,struct attack *));
  133. X! OSTATIC void FDECL(missmu,(struct monst *,BOOLEAN_P,struct attack *));
  134. X! OSTATIC void FDECL(mswings,(struct monst *,struct obj *));
  135. X! OSTATIC void FDECL(wildmiss,(struct monst *));
  136. X! 
  137. X! OSTATIC void FDECL(hurtarmor,(struct permonst *,int));
  138. X  
  139. X+ #ifdef OVL1
  140. X  
  141. X  static void
  142. X  hitmsg(mtmp, mattk)
  143. X***************
  144. X*** 61,67 ****
  145. X          }
  146. X  }
  147. X  
  148. X! static void
  149. X  missmu(mtmp, nearmiss, mattk)        /* monster missed you */
  150. X  register struct monst *mtmp;
  151. X  register boolean nearmiss;
  152. X--- 69,78 ----
  153. X          }
  154. X  }
  155. X  
  156. X! #endif /* OVL1 */
  157. X! #ifdef OVLB
  158. X! 
  159. X! XSTATIC void
  160. X  missmu(mtmp, nearmiss, mattk)        /* monster missed you */
  161. X  register struct monst *mtmp;
  162. X  register boolean nearmiss;
  163. X***************
  164. X*** 77,83 ****
  165. X      }
  166. X  }
  167. X  
  168. X! static void
  169. X  mswings(mtmp, otemp)        /* monster swings obj */
  170. X  register struct monst *mtmp;
  171. X  register struct obj *otemp;
  172. X--- 88,94 ----
  173. X      }
  174. X  }
  175. X  
  176. X! XSTATIC void
  177. X  mswings(mtmp, otemp)        /* monster swings obj */
  178. X  register struct monst *mtmp;
  179. X  register struct obj *otemp;
  180. X***************
  181. X*** 94,100 ****
  182. X            xname(otemp));
  183. X  }
  184. X  
  185. X! static void
  186. X  wildmiss(mtmp)        /* monster attacked your displaced image */
  187. X      register struct monst *mtmp;
  188. X  {
  189. X--- 105,111 ----
  190. X            xname(otemp));
  191. X  }
  192. X  
  193. X! XSTATIC void
  194. X  wildmiss(mtmp)        /* monster attacked your displaced image */
  195. X      register struct monst *mtmp;
  196. X  {
  197. X***************
  198. X*** 147,155 ****
  199. X  }
  200. X  
  201. X  void
  202. X! regurgitates(mtmp)
  203. X  register struct monst *mtmp;
  204. X  {
  205. X      unstuck(mtmp);
  206. X      mnexto(mtmp);
  207. X      prme();
  208. X--- 158,199 ----
  209. X  }
  210. X  
  211. X  void
  212. X! expels(mtmp, mdat, message)
  213. X  register struct monst *mtmp;
  214. X+ register struct permonst *mdat; /* if mtmp is polymorphed, mdat != mtmp->data */
  215. X+ boolean message;
  216. X  {
  217. X+     if (message) 
  218. X+         if (is_animal(mdat)) 
  219. X+             You("get regurgitated!");
  220. X+         else {
  221. X+             char blast[40];
  222. X+             register int i;
  223. X+ 
  224. X+             blast[0] = '\0';
  225. X+             for(i = 0; i < NATTK; i++)
  226. X+                 if(mdat->mattk[i].aatyp == AT_ENGL) 
  227. X+                     break;
  228. X+             if (mdat->mattk[i].aatyp != AT_ENGL)
  229. X+                   impossible("Swallower has no engulfing attack?"); 
  230. X+             else {
  231. X+                 if (is_whirly(mdat)) {
  232. X+                     switch (mdat->mattk[i].adtyp) {
  233. X+                         case AD_ELEC:
  234. X+                             Strcpy(blast, 
  235. X+                               " in a shower of sparks");
  236. X+                             break;
  237. X+                         case AD_COLD:
  238. X+                             Strcpy(blast, 
  239. X+                             " in a blast of frost");
  240. X+                             break;
  241. X+                     }
  242. X+                 } else
  243. X+                     Strcpy(blast, " with a squelch");
  244. X+                 You("get expelled from %s%s!", 
  245. X+                     mon_nam(mtmp), blast);
  246. X+             }
  247. X+         }
  248. X      unstuck(mtmp);
  249. X      mnexto(mtmp);
  250. X      prme();
  251. X***************
  252. X*** 159,164 ****
  253. X--- 203,211 ----
  254. X          pline("Brrooaa...  You land hard at some distance.");
  255. X  }
  256. X  
  257. X+ #endif /* OVLB */
  258. X+ #ifdef OVL0
  259. X+ 
  260. X  /*
  261. X   * mattacku: monster attacks you
  262. X   *    returns 1 if monster dies (e.g. "yellow light"), 0 otherwise
  263. X***************
  264. X*** 201,217 ****
  265. X          /* If the swallowing monster changes into a monster
  266. X           * that is not capable of swallowing you, you get
  267. X           * regurgitated - dgk
  268. X           */
  269. X-         for(i = 0; i < NATTK; i++)
  270. X-         if(mdat->mattk[i].aatyp == AT_ENGL) goto doattack;
  271. X- 
  272. X-         You("get regurgitated!");
  273. X-         regurgitates(mtmp);
  274. X-         return(0);
  275. X      }
  276. X! doattack:
  277. X  #ifdef POLYSELF
  278. X!     if (u.uundetected && !range2 && foundyou) {
  279. X          u.uundetected = 0;
  280. X          if (u.usym == S_PIERCER) {
  281. X              coord cc; /* maybe we need a unexto() function? */
  282. X--- 248,268 ----
  283. X          /* If the swallowing monster changes into a monster
  284. X           * that is not capable of swallowing you, you get
  285. X           * regurgitated - dgk
  286. X+          *
  287. X+          * This code is obsolete: newcham() will handle this contingency 
  288. X+          * as soon as it occurs in the course of a round. - kcd
  289. X+          *
  290. X+          * for(i = 0; i < NATTK; i++)
  291. X+          *     if(mdat->mattk[i].aatyp == AT_ENGL) goto doattack;
  292. X+          *
  293. X+          * You("get regurgitated!");
  294. X+          * regurgitates(mtmp);
  295. X+              * return(0);
  296. X           */
  297. X      }
  298. X! /* doattack:        use commented out above */
  299. X  #ifdef POLYSELF
  300. X!     if (u.uundetected && !range2 && foundyou && !u.uswallow) {
  301. X          u.uundetected = 0;
  302. X          if (u.usym == S_PIERCER) {
  303. X              coord cc; /* maybe we need a unexto() function? */
  304. X***************
  305. X*** 249,255 ****
  306. X          }
  307. X          return(0);
  308. X      }
  309. X!     if (u.usym == S_MIMIC_DEF && !range2 && foundyou) {
  310. X          if (Blind) pline("It gets stuck on you.");
  311. X              else pline("Wait, %s!  That's a %s named %s!",
  312. X              mtmp->mnamelth ? NAME(mtmp) : mtmp->data->mname,
  313. X--- 300,306 ----
  314. X          }
  315. X          return(0);
  316. X      }
  317. X!     if (u.usym == S_MIMIC_DEF && !range2 && foundyou && !u.uswallow) {
  318. X          if (Blind) pline("It gets stuck on you.");
  319. X              else pline("Wait, %s!  That's a %s named %s!",
  320. X              mtmp->mnamelth ? NAME(mtmp) : mtmp->data->mname,
  321. X***************
  322. X*** 313,318 ****
  323. X--- 364,371 ----
  324. X  
  325. X          sum[i] = 0;
  326. X          mattk = &(mdat->mattk[i]);
  327. X+         if (u.uswallow && (mattk->aatyp != AT_ENGL))
  328. X+         continue;
  329. X          switch(mattk->aatyp) {
  330. X          case AT_CLAW:    /* "hand to hand" attacks */
  331. X          case AT_KICK:
  332. X***************
  333. X*** 337,343 ****
  334. X  
  335. X          case AT_HUGS:    /* automatic if prev two attacks succeed */
  336. X              /* Note: if displaced, prev attacks never succeeded */
  337. X!             if(!range2 && sum[i-1] && sum[i-2])
  338. X                  sum[i]= hitmu(mtmp, mattk);
  339. X              break;
  340. X  
  341. X--- 390,397 ----
  342. X  
  343. X          case AT_HUGS:    /* automatic if prev two attacks succeed */
  344. X              /* Note: if displaced, prev attacks never succeeded */
  345. X!             if((!range2 && i>=2 && sum[i-1] && sum[i-2])
  346. X!                             || mtmp == u.ustuck)
  347. X                  sum[i]= hitmu(mtmp, mattk);
  348. X              break;
  349. X  
  350. X***************
  351. X*** 374,381 ****
  352. X                  } else {
  353. X                      missmu(mtmp, (tmp == j), mattk);
  354. X                  }
  355. X!                 } else pline("%s gulps some air!", youseeit ?
  356. X!                 Monnam(mtmp) : "It");
  357. X              }
  358. X              break;
  359. X          case AT_BREA:
  360. X--- 428,445 ----
  361. X                  } else {
  362. X                      missmu(mtmp, (tmp == j), mattk);
  363. X                  }
  364. X!                            } else if (is_animal(mtmp->data))
  365. X!                     pline("%s gulps some air!", youseeit ?
  366. X!                           Monnam(mtmp) : "It");
  367. X!                   else
  368. X!                     if (youseeit)
  369. X!                      pline("%s lunges forward and recoils!",
  370. X!                            Monnam(mtmp));
  371. X!                     else
  372. X!                         You("hear a %s nearby.", 
  373. X!                             is_whirly(mtmp->data)? 
  374. X!                             "rushing noise" : 
  375. X!                             "\"splat!\"");
  376. X              }
  377. X              break;
  378. X          case AT_BREA:
  379. X***************
  380. X*** 383,389 ****
  381. X              /* Note: breamu takes care of displacement */
  382. X              break;
  383. X          case AT_SPIT:
  384. X!             if(range2) sum[i] = spitmu(mtmp);
  385. X              /* Note: spitmu takes care of displacement */
  386. X              break;
  387. X          case AT_WEAP:
  388. X--- 447,453 ----
  389. X              /* Note: breamu takes care of displacement */
  390. X              break;
  391. X          case AT_SPIT:
  392. X!             if(range2) sum[i] = spitmu(mtmp, mattk);
  393. X              /* Note: spitmu takes care of displacement */
  394. X              break;
  395. X          case AT_WEAP:
  396. X***************
  397. X*** 436,455 ****
  398. X      return(0);
  399. X  }
  400. X  
  401. X  /*
  402. X   * helper function for some compilers that have trouble with hitmu
  403. X   */
  404. X  
  405. X! static
  406. X  void
  407. X! hurtarmor(mdat, attack)
  408. X  struct permonst *mdat;
  409. X! int attack;
  410. X  {
  411. X      boolean getbronze, rusting;
  412. X      int    hurt;
  413. X  
  414. X!     rusting = (attack == AD_RUST);
  415. X      if (rusting) {
  416. X          hurt = 1;
  417. X          getbronze = (mdat == &mons[PM_BLACK_PUDDING] &&
  418. X--- 500,522 ----
  419. X      return(0);
  420. X  }
  421. X  
  422. X+ #endif /* OVL0 */
  423. X+ #ifdef OVLB
  424. X+ 
  425. X  /*
  426. X   * helper function for some compilers that have trouble with hitmu
  427. X   */
  428. X  
  429. X! XSTATIC
  430. X  void
  431. X! hurtarmor(mdat, attk)
  432. X  struct permonst *mdat;
  433. X! int attk;
  434. X  {
  435. X      boolean getbronze, rusting;
  436. X      int    hurt;
  437. X  
  438. X!     rusting = (attk == AD_RUST);
  439. X      if (rusting) {
  440. X          hurt = 1;
  441. X          getbronze = (mdat == &mons[PM_BLACK_PUDDING] &&
  442. X***************
  443. X*** 504,515 ****
  444. X      }
  445. X  }
  446. X  
  447. X  /*
  448. X   * hitmu: monster hits you
  449. X   *      returns 2 if monster dies (e.g. "yellow light"), 1 otherwise
  450. X!  *      3 if the monster lives but teleported, so it can't keep attacking you
  451. X   */
  452. X! static
  453. X  int
  454. X  hitmu(mtmp, mattk)
  455. X      register struct monst *mtmp;
  456. X--- 571,586 ----
  457. X      }
  458. X  }
  459. X  
  460. X+ #endif /* OVLB */
  461. X+ #ifdef OVL1
  462. X+ 
  463. X  /*
  464. X   * hitmu: monster hits you
  465. X   *      returns 2 if monster dies (e.g. "yellow light"), 1 otherwise
  466. X!  *      3 if the monster lives but teleported/paralyzed, so it can't keep
  467. X!  *           attacking you
  468. X   */
  469. X! XSTATIC
  470. X  int
  471. X  hitmu(mtmp, mattk)
  472. X      register struct monst *mtmp;
  473. X***************
  474. X*** 614,626 ****
  475. X          break;
  476. X          case AD_DISE:
  477. X          hitmsg(mtmp, mattk);
  478. X!         You("feel very sick.");
  479. X          make_sick((long)rn1(25-ACURR(A_CON),15),FALSE);
  480. X          u.usick_cause = mdat->mname;
  481. X          break;
  482. X          case AD_FIRE:
  483. X          hitmsg(mtmp, mattk);
  484. X!         if(ctmp && rn2(2)) {
  485. X              pline("You're on fire!");
  486. X              if (Fire_resistance) {
  487. X              pline("The fire doesn't feel hot!");
  488. X--- 685,702 ----
  489. X          break;
  490. X          case AD_DISE:
  491. X          hitmsg(mtmp, mattk);
  492. X! #ifdef POLYSELF
  493. X!         if (u.usym == S_FUNGUS)
  494. X!             You("feel a slight illness.");
  495. X!         else
  496. X! #endif
  497. X!             You("feel very sick.");
  498. X          make_sick((long)rn1(25-ACURR(A_CON),15),FALSE);
  499. X          u.usick_cause = mdat->mname;
  500. X          break;
  501. X          case AD_FIRE:
  502. X          hitmsg(mtmp, mattk);
  503. X!         if(ctmp) {
  504. X              pline("You're on fire!");
  505. X              if (Fire_resistance) {
  506. X              pline("The fire doesn't feel hot!");
  507. X***************
  508. X*** 638,644 ****
  509. X          break;
  510. X          case AD_COLD:
  511. X          hitmsg(mtmp, mattk);
  512. X!         if(ctmp && rn2(2)) {
  513. X              pline("You're covered in frost!");
  514. X              if (Cold_resistance) {
  515. X              pline("The frost doesn't seem cold!");
  516. X--- 714,720 ----
  517. X          break;
  518. X          case AD_COLD:
  519. X          hitmsg(mtmp, mattk);
  520. X!         if(ctmp) {
  521. X              pline("You're covered in frost!");
  522. X              if (Cold_resistance) {
  523. X              pline("The frost doesn't seem cold!");
  524. X***************
  525. X*** 650,656 ****
  526. X          break;
  527. X          case AD_ELEC:
  528. X          hitmsg(mtmp, mattk);
  529. X!         if(ctmp && rn2(2)) {
  530. X              You("get zapped!");
  531. X              if (Shock_resistance) {
  532. X              pline("The zap doesn't shock you!");
  533. X--- 726,732 ----
  534. X          break;
  535. X          case AD_ELEC:
  536. X          hitmsg(mtmp, mattk);
  537. X!         if(ctmp) {
  538. X              You("get zapped!");
  539. X              if (Shock_resistance) {
  540. X              pline("The zap doesn't shock you!");
  541. X***************
  542. X*** 685,691 ****
  543. X              Sprintf(buf, "%s's %s",
  544. X                  Hallucination ? rndmonnam() : mdat->mname,
  545. X                  (mattk->aatyp == AT_BITE) ? "bite" : "sting");
  546. X!             poisoned(buf, ptmp, mdat->mname);
  547. X          }
  548. X          break;
  549. X          case AD_PLYS:
  550. X--- 761,767 ----
  551. X              Sprintf(buf, "%s's %s",
  552. X                  Hallucination ? rndmonnam() : mdat->mname,
  553. X                  (mattk->aatyp == AT_BITE) ? "bite" : "sting");
  554. X!             poisoned(buf, ptmp, mdat->mname, 30);
  555. X          }
  556. X          break;
  557. X          case AD_PLYS:
  558. X***************
  559. X*** 871,884 ****
  560. X          case AD_RUST:
  561. X          hitmsg(mtmp, mattk);
  562. X          if (mtmp->mcan) break;
  563. X! #ifdef POLYSELF
  564. X! #ifdef GOLEMS
  565. X          if (u.umonnum == PM_IRON_GOLEM) {
  566. X              You("rust!");
  567. X              rehumanize();
  568. X              break;
  569. X          }
  570. X- #endif /* GOLEMS */
  571. X  #endif
  572. X          hurtarmor(mdat, AD_RUST);
  573. X          break;
  574. X--- 947,958 ----
  575. X          case AD_RUST:
  576. X          hitmsg(mtmp, mattk);
  577. X          if (mtmp->mcan) break;
  578. X! #if defined(POLYSELF) && defined(GOLEMS)
  579. X          if (u.umonnum == PM_IRON_GOLEM) {
  580. X              You("rust!");
  581. X              rehumanize();
  582. X              break;
  583. X          }
  584. X  #endif
  585. X          hurtarmor(mdat, AD_RUST);
  586. X          break;
  587. X***************
  588. X*** 885,892 ****
  589. X          case AD_DCAY:
  590. X          hitmsg(mtmp, mattk);
  591. X          if (mtmp->mcan) break;
  592. X! #ifdef POLYSELF
  593. X! #ifdef GOLEMS
  594. X          if (u.umonnum == PM_WOOD_GOLEM ||
  595. X              u.umonnum == PM_LEATHER_GOLEM) {
  596. X              You("rot!");
  597. X--- 959,965 ----
  598. X          case AD_DCAY:
  599. X          hitmsg(mtmp, mattk);
  600. X          if (mtmp->mcan) break;
  601. X! #if defined(POLYSELF) && defined(GOLEMS)
  602. X          if (u.umonnum == PM_WOOD_GOLEM ||
  603. X              u.umonnum == PM_LEATHER_GOLEM) {
  604. X              You("rot!");
  605. X***************
  606. X*** 893,899 ****
  607. X              rehumanize();
  608. X              break;
  609. X          }
  610. X- #endif /* GOLEMS */
  611. X  #endif
  612. X          hurtarmor(mdat, AD_DCAY);
  613. X          break;
  614. X--- 966,971 ----
  615. X***************
  616. X*** 981,990 ****
  617. X  #endif
  618. X          dmg = 0;
  619. X          break;
  620. X-         case AD_CUSS:
  621. X-         if(flags.soundok && !rn2(3)) cuss(mtmp);
  622. X-         dmg = 0;
  623. X-         break;
  624. X  #ifdef INFERNO /* a non-gaze AD_CONF exists only for one of the demons */
  625. X          case AD_CONF:
  626. X          hitmsg(mtmp, mattk);
  627. X--- 1053,1058 ----
  628. X***************
  629. X*** 1013,1019 ****
  630. X      if(dmg) mdamageu(mtmp, dmg);
  631. X  
  632. X  #ifdef POLYSELF
  633. X!     res = passiveum(olduasmon, mtmp);
  634. X      stop_occupation();
  635. X      return res;
  636. X  #else
  637. X--- 1081,1087 ----
  638. X      if(dmg) mdamageu(mtmp, dmg);
  639. X  
  640. X  #ifdef POLYSELF
  641. X!     res = passiveum(olduasmon, mtmp, mattk);
  642. X      stop_occupation();
  643. X      return res;
  644. X  #else
  645. X***************
  646. X*** 1022,1028 ****
  647. X  #endif
  648. X  }
  649. X  
  650. X! static
  651. X  int
  652. X  gulpmu(mtmp, mattk)    /* monster swallows you, or damage if u.uswallow */
  653. X      register struct monst *mtmp;
  654. X--- 1090,1099 ----
  655. X  #endif
  656. X  }
  657. X  
  658. X! #endif /* OVL1 */
  659. X! #ifdef OVLB
  660. X! 
  661. X! XSTATIC
  662. X  int
  663. X  gulpmu(mtmp, mattk)    /* monster swallows you, or damage if u.uswallow */
  664. X      register struct monst *mtmp;
  665. X***************
  666. X*** 1034,1045 ****
  667. X      int    i;
  668. X  #endif
  669. X  
  670. X!     if(!u.uswallow) {    /* swallow him */
  671. X          remove_monster(mtmp->mx, mtmp->my);
  672. X          place_monster(mtmp, u.ux, u.uy);
  673. X          u.ustuck = mtmp;
  674. X          pmon(mtmp);
  675. X          kludge("%s engulfs you!", Monnam(mtmp));
  676. X          if (u.utrap) {
  677. X              You("are released from the trap!");
  678. X              u.utrap = 0;
  679. X--- 1105,1120 ----
  680. X      int    i;
  681. X  #endif
  682. X  
  683. X!     if(!u.uswallow) {    /* swallows you */
  684. X! #ifdef POLYSELF
  685. X!         if (uasmon->msize >= MZ_HUGE) return(0);
  686. X! #endif
  687. X          remove_monster(mtmp->mx, mtmp->my);
  688. X          place_monster(mtmp, u.ux, u.uy);
  689. X          u.ustuck = mtmp;
  690. X          pmon(mtmp);
  691. X          kludge("%s engulfs you!", Monnam(mtmp));
  692. X+         stop_occupation();
  693. X          if (u.utrap) {
  694. X              You("are released from the trap!");
  695. X              u.utrap = 0;
  696. X***************
  697. X*** 1053,1059 ****
  698. X          }
  699. X  #endif
  700. X  #ifdef POLYSELF
  701. X!         if (u.umonnum==PM_COCKATRICE) {
  702. X              kludge("%s turns to stone!", Monnam(mtmp));
  703. X              stoned = 1;
  704. X              xkilled(mtmp, 0);
  705. X--- 1128,1134 ----
  706. X          }
  707. X  #endif
  708. X  #ifdef POLYSELF
  709. X!         if (u.umonnum==PM_COCKATRICE && !resists_ston(mtmp->data)) {
  710. X              kludge("%s turns to stone!", Monnam(mtmp));
  711. X              stoned = 1;
  712. X              xkilled(mtmp, 0);
  713. X***************
  714. X*** 1151,1182 ****
  715. X      }
  716. X  
  717. X      mdamageu(mtmp, tmp);
  718. X      if(u.uswldtim) --u.uswldtim;
  719. X      if(!u.uswldtim
  720. X  #ifdef POLYSELF
  721. X          || u.umonnum==PM_COCKATRICE
  722. X  #endif
  723. X          ) {
  724. X  #ifdef POLYSELF
  725. X          if (u.umonnum == PM_COCKATRICE) {
  726. X!         kludge("%s very hurriedly regurgitates you!",
  727. X!                Monnam(mtmp));
  728. X          u.uswldtim = 0;
  729. X          } else {
  730. X  #endif
  731. X!         You("get regurgitated!");
  732. X!         if(flags.verbose)
  733. X!             kludge("Obviously %s doesn't like your taste.",
  734. X!                             mon_nam(mtmp));
  735. X  #ifdef POLYSELF
  736. X          }
  737. X  #endif
  738. X!         regurgitates(mtmp);
  739. X      }
  740. X      return(1);
  741. X  }
  742. X  
  743. X! static
  744. X  int
  745. X  explmu(mtmp, mattk)    /* monster explodes in your face */
  746. X      register struct monst *mtmp;
  747. X--- 1226,1260 ----
  748. X      }
  749. X  
  750. X      mdamageu(mtmp, tmp);
  751. X+     if(tmp) stop_occupation();
  752. X      if(u.uswldtim) --u.uswldtim;
  753. X      if(!u.uswldtim
  754. X  #ifdef POLYSELF
  755. X          || u.umonnum==PM_COCKATRICE
  756. X+         || uasmon->msize >= MZ_HUGE
  757. X  #endif
  758. X          ) {
  759. X  #ifdef POLYSELF
  760. X          if (u.umonnum == PM_COCKATRICE) {
  761. X!         kludge("%s very hurriedly %s you!", Monnam(mtmp), 
  762. X!                is_animal(mtmp->data)? "regurgitates" : "expels");
  763. X          u.uswldtim = 0;
  764. X          } else {
  765. X  #endif
  766. X!         You("get %s!", 
  767. X!             is_animal(mtmp->data)? "regurgitated" : "expelled");
  768. X!         if(flags.verbose && is_animal(mtmp->data))
  769. X!             kludge("Obviously %s doesn't like your taste.",
  770. X!                    mon_nam(mtmp));
  771. X  #ifdef POLYSELF
  772. X          }
  773. X  #endif
  774. X!         expels(mtmp, mtmp->data, FALSE);
  775. X      }
  776. X      return(1);
  777. X  }
  778. X  
  779. X! XSTATIC
  780. X  int
  781. X  explmu(mtmp, mattk)    /* monster explodes in your face */
  782. X      register struct monst *mtmp;
  783. X***************
  784. X*** 1198,1205 ****
  785. X              tmp = 0;
  786. X          } else {
  787. X              if(ACURR(A_DEX) > rnd(20)) {
  788. X!                 if (!flags.verbose)
  789. X!                     You("are caught in the blast!");
  790. X              } else {
  791. X                  You("duck the blast...");
  792. X                  tmp /= 2;
  793. X--- 1276,1283 ----
  794. X              tmp = 0;
  795. X          } else {
  796. X              if(ACURR(A_DEX) > rnd(20)) {
  797. X!                 if (flags.verbose)
  798. X!                     You("get blasted!");
  799. X              } else {
  800. X                  You("duck the blast...");
  801. X                  tmp /= 2;
  802. X***************
  803. X*** 1224,1230 ****
  804. X      return(2);    /* it dies */
  805. X  }
  806. X  
  807. X! static
  808. X  int
  809. X  gazemu(mtmp, mattk)    /* monster gazes at you */
  810. X      register struct monst *mtmp;
  811. X--- 1302,1308 ----
  812. X      return(2);    /* it dies */
  813. X  }
  814. X  
  815. X! XSTATIC
  816. X  int
  817. X  gazemu(mtmp, mattk)    /* monster gazes at you */
  818. X      register struct monst *mtmp;
  819. X***************
  820. X*** 1239,1251 ****
  821. X          }
  822. X          if (canseemon(mtmp)) {
  823. X              You("look upon %s.", mon_nam(mtmp));
  824. X! #ifdef POLYSELF
  825. X              if (resists_ston(uasmon)) {
  826. X                  pline("So what?");
  827. X                  break;
  828. X              }
  829. X! #endif
  830. X              You("turn to stone...");
  831. X              killer = mons[PM_MEDUSA].mname;
  832. X              done(STONING);
  833. X              }
  834. X--- 1317,1330 ----
  835. X          }
  836. X          if (canseemon(mtmp)) {
  837. X              You("look upon %s.", mon_nam(mtmp));
  838. X! # ifdef POLYSELF
  839. X              if (resists_ston(uasmon)) {
  840. X                  pline("So what?");
  841. X                  break;
  842. X              }
  843. X! # endif
  844. X              You("turn to stone...");
  845. X+             killer_format = KILLED_BY_AN;
  846. X              killer = mons[PM_MEDUSA].mname;
  847. X              done(STONING);
  848. X              }
  849. X***************
  850. X*** 1282,1287 ****
  851. X--- 1361,1369 ----
  852. X      return(1);
  853. X  }
  854. X  
  855. X+ #endif /* OVLB */
  856. X+ #ifdef OVL1
  857. X+ 
  858. X  void
  859. X  mdamageu(mtmp, n)    /* mtmp hits you for n points damage */
  860. X      register struct monst *mtmp;
  861. X***************
  862. X*** 1301,1308 ****
  863. X          done_in_by(mtmp);
  864. X  }
  865. X  
  866. X  #ifdef POLYSELF
  867. X! static void
  868. X  urustm(mon, obj)
  869. X  register struct monst *mon;
  870. X  register struct obj *obj;
  871. X--- 1383,1393 ----
  872. X          done_in_by(mtmp);
  873. X  }
  874. X  
  875. X+ #endif /* OVL1 */
  876. X+ #ifdef OVLB
  877. X+ 
  878. X  #ifdef POLYSELF
  879. X! XSTATIC void
  880. X  urustm(mon, obj)
  881. X  register struct monst *mon;
  882. X  register struct obj *obj;
  883. X***************
  884. X*** 1330,1335 ****
  885. X--- 1415,1423 ----
  886. X  }
  887. X  #endif
  888. X  
  889. X+ #endif /* OVLB */
  890. X+ #ifdef OVL1
  891. X+ 
  892. X  int
  893. X  could_seduce(magr,mdef,mattk)
  894. X  struct monst *magr, *mdef;
  895. X***************
  896. X*** 1385,1390 ****
  897. X--- 1473,1481 ----
  898. X          return (pagr->mlet == S_NYMPH) ? 2 : 0;
  899. X  }
  900. X  
  901. X+ #endif /* OVL1 */
  902. X+ #ifdef OVLB
  903. X+ 
  904. X  #ifdef SEDUCE
  905. X  /* Returns 1 if monster teleported */
  906. X  int
  907. X***************
  908. X*** 1527,1532 ****
  909. X--- 1618,1624 ----
  910. X                      You("feel out of shape.");
  911. X                      losexp();
  912. X                      if(u.uhp <= 0) {
  913. X+                     killer_format = KILLED_BY;
  914. X                      killer = "overexertion";
  915. X                      done(DIED);
  916. X                      }
  917. X***************
  918. X*** 1535,1541 ****
  919. X  #endif
  920. X                  break;
  921. X              case 4: You("feel exhausted.");
  922. X!                 losehp(5+rnd(10), "exhaustion");
  923. X                  break;
  924. X          }
  925. X      } else {
  926. X--- 1627,1633 ----
  927. X  #endif
  928. X                  break;
  929. X              case 4: You("feel exhausted.");
  930. X!                 losehp(5+rnd(10), "exhaustion", KILLED_BY);
  931. X                  break;
  932. X          }
  933. X      } else {
  934. X***************
  935. X*** 1606,1612 ****
  936. X  static void
  937. X  mayberem(obj, str)
  938. X  register struct obj *obj;
  939. X! char *str;
  940. X  {
  941. X      if (!obj || !obj->owornmask) return;
  942. X  
  943. X--- 1698,1704 ----
  944. X  static void
  945. X  mayberem(obj, str)
  946. X  register struct obj *obj;
  947. X! const char *str;
  948. X  {
  949. X      if (!obj || !obj->owornmask) return;
  950. X  
  951. X***************
  952. X*** 1626,1631 ****
  953. X--- 1718,1724 ----
  954. X              /* obj == uarmh */
  955. X              "let me run my fingers through your hair");
  956. X  
  957. X+     if (donning(obj)) cancel_don();
  958. X      if (obj == uarm)  (void) Armor_off();
  959. X      else if (obj == uarmc) (void) Cloak_off();
  960. X      else if (obj == uarmf) (void) Boots_off();
  961. X***************
  962. X*** 1635,1662 ****
  963. X  }
  964. X  #endif  /* SEDUCE */
  965. X  
  966. X  #ifdef POLYSELF
  967. X  static int
  968. X! passiveum(olduasmon,mtmp)
  969. X  struct permonst *olduasmon;
  970. X  register struct monst *mtmp;
  971. X  {
  972. X      register struct permonst *mdat = mtmp->data;
  973. X      int dam = 0;
  974. X  
  975. X!     if (olduasmon->mattk[0].aatyp != AT_NONE) return 1;
  976. X  
  977. X      /* These affect the enemy even if you were "killed" (rehumanized) */
  978. X!     switch(olduasmon->mattk[0].adtyp) {
  979. X          case AD_ACID:
  980. X          if (!rn2(2)) {
  981. X              kludge("%s is splashed by your acid!", Monnam(mtmp));
  982. X              if(!resists_acid(mdat))
  983. X              dam = d((int)olduasmon->mlevel+1,
  984. X!                     (int)olduasmon->mattk[0].damd);
  985. X              else pline("%s is not affected.", Monnam(mtmp));
  986. X          }
  987. X          break;
  988. X          default:
  989. X          break;
  990. X      }
  991. X--- 1728,1777 ----
  992. X  }
  993. X  #endif  /* SEDUCE */
  994. X  
  995. X+ #endif /* OVLB */
  996. X+ 
  997. X  #ifdef POLYSELF
  998. X+ 
  999. X+ #ifdef OVL1
  1000. X+ 
  1001. X  static int
  1002. X! passiveum(olduasmon,mtmp,mattk)
  1003. X  struct permonst *olduasmon;
  1004. X  register struct monst *mtmp;
  1005. X+ register struct attack *mattk;
  1006. X  {
  1007. X      register struct permonst *mdat = mtmp->data;
  1008. X+     int i;
  1009. X      int dam = 0;
  1010. X  
  1011. X!     for(i = 0; ; i++) {
  1012. X!         if(i >= NATTK) return 1;
  1013. X!         if(olduasmon->mattk[i].aatyp == AT_NONE) break;
  1014. X!     }
  1015. X  
  1016. X      /* These affect the enemy even if you were "killed" (rehumanized) */
  1017. X!     switch(olduasmon->mattk[i].adtyp) {
  1018. X          case AD_ACID:
  1019. X          if (!rn2(2)) {
  1020. X              kludge("%s is splashed by your acid!", Monnam(mtmp));
  1021. X              if(!resists_acid(mdat))
  1022. X              dam = d((int)olduasmon->mlevel+1,
  1023. X!                     (int)olduasmon->mattk[i].damd);
  1024. X              else pline("%s is not affected.", Monnam(mtmp));
  1025. X          }
  1026. X          break;
  1027. X+         case AD_STON: /* cockatrice */
  1028. X+         if (!resists_ston(mdat) &&
  1029. X+             (mattk->aatyp != AT_WEAP || !select_hwep(mtmp)) &&
  1030. X+             mattk->aatyp != AT_GAZE && mattk->aatyp != AT_EXPL &&
  1031. X+             mattk->aatyp != AT_MAGC &&
  1032. X+             (!is_mercenary(mdat) ||
  1033. X+                       !m_carrying(mtmp, LEATHER_GLOVES))) {
  1034. X+             kludge("%s turns to stone!", Monnam(mtmp));
  1035. X+             stoned = 1;
  1036. X+             xkilled(mtmp, 0);
  1037. X+             return 2;
  1038. X+         }
  1039. X          default:
  1040. X          break;
  1041. X      }
  1042. X***************
  1043. X*** 1663,1682 ****
  1044. X      if (!u.mtimedone) return 1;
  1045. X  
  1046. X      /* These affect the enemy only if you are still a monster */
  1047. X!     if (rn2(3)) switch(uasmon->mattk[0].adtyp) {
  1048. X          case AD_PLYS: /* Floating eye */
  1049. X!         if (!mtmp->mblinded && rn2(3)) {
  1050. X!             if (Blind)
  1051. X!             pline("As a blind %s, you cannot defend yourself.",
  1052. X                              uasmon->mname);
  1053. X!             else {
  1054. X!             pline("%s is frozen by your gaze!", Monnam(mtmp));
  1055. X!             mtmp->mfroz = 1;
  1056. X!             }
  1057. X          }
  1058. X          break;
  1059. X          case AD_COLD: /* Brown mold or blue jelly */
  1060. X!         dam = d((int)uasmon->mlevel+1, (int)uasmon->mattk[0].damd);
  1061. X          if(resists_cold(mdat)) {
  1062. X                shieldeff(mtmp->mx, mtmp->my);
  1063. X              kludge("%s is mildly chilly.", Monnam(mtmp));
  1064. X--- 1778,1810 ----
  1065. X      if (!u.mtimedone) return 1;
  1066. X  
  1067. X      /* These affect the enemy only if you are still a monster */
  1068. X!     if (rn2(3)) switch(uasmon->mattk[i].adtyp) {
  1069. X          case AD_PLYS: /* Floating eye */
  1070. X!         {int tmp = d((int)uasmon->mlevel+1, (int)uasmon->mattk[i].damd);
  1071. X!         if (u.umonnum == PM_FLOATING_EYE) {
  1072. X!             if (!rn2(4)) tmp = 120;
  1073. X!             if (mtmp->mcansee && rn2(3) &&
  1074. X!                 (perceives(mdat) || !Invis)) {
  1075. X!             if (Blind)
  1076. X!                 pline("As a blind %s, you cannot defend yourself.",
  1077. X                              uasmon->mname);
  1078. X!                 else {
  1079. X!                 pline("%s is frozen by your gaze!", Monnam(mtmp));
  1080. X!                 mtmp->mcanmove = 0;
  1081. X!                 mtmp->mfrozen = tmp;
  1082. X!                 return 3;
  1083. X!             }
  1084. X!             }
  1085. X!         } else { /* gelatinous cube */
  1086. X!             kludge("%s is frozen by you.", Monnam(mtmp));
  1087. X!             mtmp->mcanmove = 0;
  1088. X!             mtmp->mfrozen = tmp;
  1089. X!             return 3;
  1090. X          }
  1091. X          break;
  1092. X+         }
  1093. X          case AD_COLD: /* Brown mold or blue jelly */
  1094. X!         dam = d((int)uasmon->mlevel+1, (int)uasmon->mattk[i].damd);
  1095. X          if(resists_cold(mdat)) {
  1096. X                shieldeff(mtmp->mx, mtmp->my);
  1097. X              kludge("%s is mildly chilly.", Monnam(mtmp));
  1098. X***************
  1099. X*** 1704,1714 ****
  1100. X          case AD_STUN: /* Yellow mold */
  1101. X          if (!mtmp->mstun) {
  1102. X              mtmp->mstun = 1;
  1103. X!             kludge("%s staggers...", Monnam(mtmp));
  1104. X          }
  1105. X          break;
  1106. X          case AD_FIRE: /* Red mold */
  1107. X!         dam = d((int)uasmon->mlevel+1, (int)uasmon->mattk[0].damd);
  1108. X          if(resists_fire(mdat)) {
  1109. X                shieldeff(mtmp->mx, mtmp->my);
  1110. X              kludge("%s is mildly warm.", Monnam(mtmp));
  1111. X--- 1832,1842 ----
  1112. X          case AD_STUN: /* Yellow mold */
  1113. X          if (!mtmp->mstun) {
  1114. X              mtmp->mstun = 1;
  1115. X!             kludge("%s staggers.", Monnam(mtmp));
  1116. X          }
  1117. X          break;
  1118. X          case AD_FIRE: /* Red mold */
  1119. X!         dam = d((int)uasmon->mlevel+1, (int)uasmon->mattk[i].damd);
  1120. X          if(resists_fire(mdat)) {
  1121. X                shieldeff(mtmp->mx, mtmp->my);
  1122. X              kludge("%s is mildly warm.", Monnam(mtmp));
  1123. X***************
  1124. X*** 1719,1748 ****
  1125. X              break;
  1126. X          }
  1127. X          kludge("%s is suddenly very hot!", Monnam(mtmp));
  1128. X      }
  1129. X  
  1130. X      if((mtmp->mhp -= dam) <= 0) {
  1131. X          kludge("%s dies!", Monnam(mtmp));
  1132. X          xkilled(mtmp,0);
  1133. X!         return(2);
  1134. X      }
  1135. X      return 1;
  1136. X  }
  1137. X  
  1138. X  #include "edog.h"
  1139. X  struct monst *
  1140. X  cloneu()
  1141. X  {
  1142. X      register struct monst *mon;
  1143. X-     register int nmlth = strlen(plname) + 1;
  1144. X  
  1145. X      if (u.mh <= 1) return(struct monst *)0;
  1146. X!     uasmon->pxlth += sizeof(struct edog) + nmlth;
  1147. X      mon = makemon(uasmon, u.ux, u.uy);
  1148. X!     uasmon->pxlth -= sizeof(struct edog) + nmlth;
  1149. X!     mon->mxlth = sizeof(struct edog);
  1150. X!     Strcpy(NAME(mon), plname);
  1151. X!     mon->mnamelth = nmlth;
  1152. X      initedog(mon);
  1153. X      mon->m_lev = uasmon->mlevel;
  1154. X      mon->mhp = u.mh /= 2;
  1155. X--- 1847,1877 ----
  1156. X              break;
  1157. X          }
  1158. X          kludge("%s is suddenly very hot!", Monnam(mtmp));
  1159. X+         default: break;
  1160. X      }
  1161. X  
  1162. X      if((mtmp->mhp -= dam) <= 0) {
  1163. X          kludge("%s dies!", Monnam(mtmp));
  1164. X          xkilled(mtmp,0);
  1165. X!         return 2;
  1166. X      }
  1167. X      return 1;
  1168. X  }
  1169. X  
  1170. X+ #endif /* OVL1 */
  1171. X+ #ifdef OVLB
  1172. X+ 
  1173. X  #include "edog.h"
  1174. X  struct monst *
  1175. X  cloneu()
  1176. X  {
  1177. X      register struct monst *mon;
  1178. X  
  1179. X      if (u.mh <= 1) return(struct monst *)0;
  1180. X!     uasmon->pxlth += sizeof(struct edog);
  1181. X      mon = makemon(uasmon, u.ux, u.uy);
  1182. X!     uasmon->pxlth -= sizeof(struct edog);
  1183. X!     mon = christen_monst(mon, plname);
  1184. X      initedog(mon);
  1185. X      mon->m_lev = uasmon->mlevel;
  1186. X      mon->mhp = u.mh /= 2;
  1187. X***************
  1188. X*** 1749,1752 ****
  1189. X--- 1878,1885 ----
  1190. X      mon->mhpmax = u.mhmax;
  1191. X      return(mon);
  1192. X  }
  1193. X+ 
  1194. X+ #endif /* OVLB */
  1195. X+ 
  1196. X  #endif /* POLYSELF */
  1197. X+ 
  1198. X*** src/Old/mklev.c    Mon Feb 19 20:30:16 1990
  1199. X--- src/mklev.c    Fri Feb  2 18:21:28 1990
  1200. X***************
  1201. X*** 1,4 ****
  1202. X! /*    SCCS Id: @(#)mklev.c    3.0    88/11/24
  1203. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  1204. X  /* NetHack may be freely redistributed.  See license for details. */
  1205. X  
  1206. X--- 1,4 ----
  1207. X! /*    SCCS Id: @(#)mklev.c    3.0    89/12/06
  1208. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  1209. X  /* NetHack may be freely redistributed.  See license for details. */
  1210. X  
  1211. X***************
  1212. X*** 9,20 ****
  1213. X  /* conversion of result to int is reasonable */
  1214. X  
  1215. X  #ifdef SINKS
  1216. X! static void mksink();
  1217. X  #endif
  1218. X  #ifdef ALTARS
  1219. X! static void mkaltar();
  1220. X  #endif
  1221. X! static boolean occupied();
  1222. X  
  1223. X  int
  1224. X  somex(croom)
  1225. X--- 9,37 ----
  1226. X  /* conversion of result to int is reasonable */
  1227. X  
  1228. X  #ifdef SINKS
  1229. X! static void FDECL(mksink,(struct mkroom *));
  1230. X  #endif
  1231. X  #ifdef ALTARS
  1232. X! static void FDECL(mkaltar,(struct mkroom *));
  1233. X  #endif
  1234. X! static boolean FDECL(occupied,(XCHAR_P,XCHAR_P));
  1235. X! static void NDECL(makevtele);
  1236. X! static void NDECL(init_levels);
  1237. X! static void NDECL(makelevel);
  1238. X! static boolean FDECL(bydoor,(XCHAR_P,XCHAR_P));
  1239. X! static boolean FDECL(place_niche,(struct mkroom *,int*,int*,int*));
  1240. X! static void FDECL(makeniche,(int));
  1241. X! static void NDECL(make_niches);
  1242. X! static void NDECL(makebigroom);
  1243. X! static void FDECL(addrsx,(int,int,int,int,BOOLEAN_P));
  1244. X! static void FDECL(addrs,(int,int,int,int));
  1245. X! static int FDECL(comp,(genericptr_t,genericptr_t));
  1246. X! static void FDECL(dosdoor,(int,int,struct mkroom *,int));
  1247. X! static void NDECL(makecorridors);
  1248. X! static void FDECL(join,(int,int));
  1249. X! static int NDECL(makerooms);
  1250. X! static int FDECL(maker,(SCHAR_P,SCHAR_P,SCHAR_P,SCHAR_P,BOOLEAN_P));
  1251. X! static void FDECL(finddpos,(coord *,XCHAR_P,XCHAR_P,XCHAR_P,XCHAR_P));
  1252. X  
  1253. X  int
  1254. X  somex(croom)
  1255. X***************
  1256. X*** 115,126 ****
  1257. X      }
  1258. X  }
  1259. X  
  1260. X  static int
  1261. X! comp(x,y)
  1262. X! register struct mkroom *x,*y;
  1263. X  {
  1264. X      if(x->lx < y->lx) return(-1);
  1265. X      return(x->lx > y->lx);
  1266. X  }
  1267. X  
  1268. X  static void
  1269. X--- 132,157 ----
  1270. X      }
  1271. X  }
  1272. X  
  1273. X+ /* Args must be genericptr_t so that qsort will always be happy. */
  1274. X+ 
  1275. X  static int
  1276. X! comp(vx,vy)
  1277. X! genericptr_t vx, vy;
  1278. X  {
  1279. X+ #ifdef LINT
  1280. X+ /* lint complains about possible pointer alignment problems, but we know
  1281. X+    that vx and vy are always properly aligned. Hence, the following
  1282. X+    bogus definition:
  1283. X+ */
  1284. X+     return (vx == vy) ? 0 : -1;
  1285. X+ #else
  1286. X+     register struct mkroom *x, *y;
  1287. X+ 
  1288. X+     x = (struct mkroom *)vx;
  1289. X+     y = (struct mkroom *)vy;
  1290. X      if(x->lx < y->lx) return(-1);
  1291. X      return(x->lx > y->lx);
  1292. X+ #endif /* LINT */
  1293. X  }
  1294. X  
  1295. X  static void
  1296. X***************
  1297. X*** 793,799 ****
  1298. X              x = somex(croom); y = somey(croom);
  1299. X              if (goodpos(x,y,(struct permonst *)0)) {
  1300. X                  otmp = mk_tt_object(STATUE, x, y);
  1301. X!                 while(resists_ston(&mons[otmp->corpsenm])) {
  1302. X                      otmp->corpsenm = rndmonnum();
  1303. X                      otmp->owt = weight(otmp);
  1304. X                  }
  1305. X--- 824,831 ----
  1306. X              x = somex(croom); y = somey(croom);
  1307. X              if (goodpos(x,y,(struct permonst *)0)) {
  1308. X                  otmp = mk_tt_object(STATUE, x, y);
  1309. X!                 while(otmp &&
  1310. X!                       resists_ston(&mons[otmp->corpsenm])) {
  1311. X                      otmp->corpsenm = rndmonnum();
  1312. X                      otmp->owt = weight(otmp);
  1313. X                  }
  1314. X***************
  1315. X*** 817,823 ****
  1316. X  #endif
  1317. X      is_maze_lev = FALSE;
  1318. X  
  1319. X! #ifdef SYSV
  1320. X      qsort((genericptr_t) rooms, (unsigned)nroom, sizeof(struct mkroom), comp);
  1321. X  #else
  1322. X      qsort((genericptr_t) rooms, nroom, sizeof(struct mkroom), comp);
  1323. X--- 849,855 ----
  1324. X  #endif
  1325. X      is_maze_lev = FALSE;
  1326. X  
  1327. X! #if defined(SYSV) || defined(DGUX)
  1328. X      qsort((genericptr_t) rooms, (unsigned)nroom, sizeof(struct mkroom), comp);
  1329. X  #else
  1330. X      qsort((genericptr_t) rooms, nroom, sizeof(struct mkroom), comp);
  1331. X***************
  1332. X*** 892,908 ****
  1333. X  
  1334. X          /* put a sleeping monster inside */
  1335. X          /* Note: monster may be on the stairs. This cannot be
  1336. X!            avoided: maybe the player fell through a trapdoor
  1337. X             while a monster was on the stairs. Conclusion:
  1338. X             we have to check for monsters on the stairs anyway. */
  1339. X  
  1340. X          if(u.uhave_amulet || !rn2(3)) {
  1341. X              x = somex(croom); y = somey(croom);
  1342. X- #ifdef REINCARNATION
  1343. X-             if (dlevel == rogue_level)
  1344. X-             tmonst = makemon(roguemon(), x, y);
  1345. X-             else
  1346. X- #endif
  1347. X              tmonst = makemon((struct permonst *) 0, x,y);
  1348. X              if (tmonst && tmonst->data == &mons[PM_GIANT_SPIDER])
  1349. X              (void) maketrap (x,y,WEB);
  1350. X--- 924,935 ----
  1351. X  
  1352. X          /* put a sleeping monster inside */
  1353. X          /* Note: monster may be on the stairs. This cannot be
  1354. X!            avoided: maybe the player fell through a trap door
  1355. X             while a monster was on the stairs. Conclusion:
  1356. X             we have to check for monsters on the stairs anyway. */
  1357. X  
  1358. X          if(u.uhave_amulet || !rn2(3)) {
  1359. X              x = somex(croom); y = somey(croom);
  1360. X              tmonst = makemon((struct permonst *) 0, x,y);
  1361. X              if (tmonst && tmonst->data == &mons[PM_GIANT_SPIDER])
  1362. X              (void) maketrap (x,y,WEB);
  1363. X***************
  1364. X*** 1063,1068 ****
  1365. X--- 1090,1098 ----
  1366. X  
  1367. X      xchar mx,my;
  1368. X  
  1369. X+ #ifdef __GNULINT__
  1370. X+     kind = nomimic = 0;
  1371. X+ #endif
  1372. X      if(!num || num >= TRAPNUM) {
  1373. X          nomonst = (dlevel < 4) ? 1 : 0;
  1374. X          nolevltp = (dlevel < 5) ? 1 : 0;
  1375. X***************
  1376. X*** 1127,1133 ****
  1377. X  
  1378. X          if((mtmp = makemon(mkclass(S_MIMIC), mx, my))) {
  1379. X              mtmp->mimic = 1;
  1380. X!             mtmp->mappearance = CLOSED_DOOR_SYM;
  1381. X          }
  1382. X          return;
  1383. X      }
  1384. X--- 1157,1164 ----
  1385. X  
  1386. X          if((mtmp = makemon(mkclass(S_MIMIC), mx, my))) {
  1387. X              mtmp->mimic = 1;
  1388. X!             mtmp->m_ap_type = M_AP_FURNITURE;
  1389. X!             mtmp->mappearance = S_cdoor;
  1390. X          }
  1391. X          return;
  1392. X      }
  1393. X*** src/Old/mkmaze.c    Mon Feb 19 20:30:58 1990
  1394. X--- src/mkmaze.c    Wed Jan  3 22:06:51 1990
  1395. X***************
  1396. X*** 7,12 ****
  1397. X--- 7,16 ----
  1398. X  extern int x_maze_max, y_maze_max;
  1399. X  
  1400. X  #if defined(WALLIFIED_MAZE) || defined(STRONGHOLD)
  1401. X+ static int FDECL(iswall,(int,int));
  1402. X+ static boolean FDECL(okay,(int,int,int));
  1403. X+ static void FDECL(maze0xy,(coord *));
  1404. X+ 
  1405. X  static int
  1406. X  iswall(x,y)
  1407. X  int x,y;
  1408. X*** src/Old/mkobj.c    Mon Feb 19 20:31:18 1990
  1409. X--- src/mkobj.c    Thu Feb  8 17:18:40 1990
  1410. X***************
  1411. X*** 4,14 ****
  1412. X--- 4,18 ----
  1413. X  
  1414. X  #include "hack.h"
  1415. X  
  1416. X+ static void FDECL(mkbox_cnts,(struct obj *));
  1417. X+ 
  1418. X  struct icp {
  1419. X      int  iprob; /* probability of an item type */
  1420. X      char ilet;    /* item class */
  1421. X  };
  1422. X  
  1423. X+ #ifdef OVLB
  1424. X+ 
  1425. X  const struct icp mkobjprobs[] = {
  1426. X  {10, WEAPON_SYM},
  1427. X  {10, ARMOR_SYM},
  1428. X***************
  1429. X*** 110,121 ****
  1430. X      register int tprob, i, prob = rnd(1000);
  1431. X  
  1432. X      if(let == RANDOM_SYM) {
  1433. X!         struct icp *iprobs =
  1434. X  #ifdef REINCARNATION
  1435. X!                     (dlevel == rogue_level) ? rogueprobs :
  1436. X  #endif
  1437. X!                     Inhell ? hellprobs :
  1438. X!                     mkobjprobs;
  1439. X  
  1440. X          for(tprob = rnd(100);
  1441. X              (tprob -= iprobs->iprob) > 0;
  1442. X--- 114,126 ----
  1443. X      register int tprob, i, prob = rnd(1000);
  1444. X  
  1445. X      if(let == RANDOM_SYM) {
  1446. X!         const struct icp *iprobs =
  1447. X  #ifdef REINCARNATION
  1448. X!                     (dlevel == rogue_level) ?
  1449. X!                     (const struct icp *)rogueprobs :
  1450. X  #endif
  1451. X!                     Inhell ? (const struct icp *)hellprobs :
  1452. X!                     (const struct icp *)mkobjprobs;
  1453. X  
  1454. X          for(tprob = rnd(100);
  1455. X              (tprob -= iprobs->iprob) > 0;
  1456. X***************
  1457. X*** 162,168 ****
  1458. X          otmp->age = 0;
  1459. X          } else {
  1460. X          register int tprob;
  1461. X!         struct icp *iprobs = boxiprobs;
  1462. X  
  1463. X          for(tprob = rnd(100);
  1464. X              (tprob -= iprobs->iprob) > 0;
  1465. X--- 167,173 ----
  1466. X          otmp->age = 0;
  1467. X          } else {
  1468. X          register int tprob;
  1469. X!         const struct icp *iprobs = boxiprobs;
  1470. X  
  1471. X          for(tprob = rnd(100);
  1472. X              (tprob -= iprobs->iprob) > 0;
  1473. X***************
  1474. X*** 239,245 ****
  1475. X  #endif
  1476. X          break;
  1477. X      case FOOD_SYM:
  1478. X!         otmp->oeaten = FALSE;
  1479. X          if(otmp->otyp == CORPSE) {
  1480. X              /* overridden by mkcorpstat() */
  1481. X              do otmp->corpsenm = rndmonnum();
  1482. X--- 244,250 ----
  1483. X  #endif
  1484. X          break;
  1485. X      case FOOD_SYM:
  1486. X!         otmp->oeaten = 0;
  1487. X          if(otmp->otyp == CORPSE) {
  1488. X              /* overridden by mkcorpstat() */
  1489. X              do otmp->corpsenm = rndmonnum();
  1490. X***************
  1491. X*** 412,417 ****
  1492. X--- 417,426 ----
  1493. X  {
  1494. X      otmp->cursed = 0;
  1495. X      otmp->blessed = 1;
  1496. X+     if (otmp->otyp == LUCKSTONE) {
  1497. X+         if (stone_luck(TRUE) >= 0) u.moreluck = LUCKADD;
  1498. X+         else u.moreluck = -LUCKADD;
  1499. X+     }
  1500. X      return;
  1501. X  }
  1502. X  
  1503. X***************
  1504. X*** 421,426 ****
  1505. X--- 430,439 ----
  1506. X  {
  1507. X      otmp->blessed = 0;
  1508. X      otmp->cursed = 1;
  1509. X+     if (otmp->otyp == LUCKSTONE) {
  1510. X+         if (stone_luck(TRUE) >= 0) u.moreluck = LUCKADD;
  1511. X+         else u.moreluck = -LUCKADD;
  1512. X+     }
  1513. X      return;
  1514. X  }
  1515. X  
  1516. X***************
  1517. X*** 454,459 ****
  1518. X--- 467,475 ----
  1519. X      return(('@' <= c && c <= 'Z') || ('a' <= c && c <= 'z'));
  1520. X  }
  1521. X  
  1522. X+ #endif /* OVLB */
  1523. X+ #ifdef OVL0
  1524. X+ 
  1525. X  int
  1526. X  weight(obj)
  1527. X  register struct obj *obj;
  1528. X***************
  1529. X*** 476,481 ****
  1530. X--- 492,500 ----
  1531. X      return(wt ? wt*obj->quan : (obj->quan + 1)>>1);
  1532. X  }
  1533. X  
  1534. X+ #endif /* OVL0 */
  1535. X+ #ifdef OVLB
  1536. X+ 
  1537. X  void
  1538. X  mkgold(num,x,y)
  1539. X  long num;
  1540. X***************
  1541. X*** 554,569 ****
  1542. X      return(otmp);
  1543. X  }
  1544. X  
  1545. X- #ifdef STUPID_CPP
  1546. X  boolean
  1547. X  is_flammable(otmp)
  1548. X  register struct obj *otmp;
  1549. X  {
  1550. X!     return((objects[otmp->otyp].oc_material == WOOD ||
  1551. X!             objects[otmp->otyp].oc_material == 0));
  1552. X  
  1553. X  }
  1554. X  
  1555. X  boolean
  1556. X  is_rustprone(otmp)
  1557. X  register struct obj *otmp;
  1558. X--- 573,592 ----
  1559. X      return(otmp);
  1560. X  }
  1561. X  
  1562. X  boolean
  1563. X  is_flammable(otmp)
  1564. X  register struct obj *otmp;
  1565. X  {
  1566. X!     int otyp = otmp->otyp;
  1567. X! 
  1568. X!     if (otyp == DRAGON_SCALE_MAIL && otmp->corpsenm == PM_RED_DRAGON)
  1569. X!         return FALSE;
  1570. X!     return((objects[otyp].oc_material == WOOD ||
  1571. X!             objects[otyp].oc_material == 0));
  1572. X  
  1573. X  }
  1574. X  
  1575. X+ #ifdef STUPID_CPP
  1576. X  boolean
  1577. X  is_rustprone(otmp)
  1578. X  register struct obj *otmp;
  1579. X***************
  1580. X*** 629,632 ****
  1581. X      place_object(otmp, x, y);
  1582. X  }
  1583. X  
  1584. X! 
  1585. X--- 652,655 ----
  1586. X      place_object(otmp, x, y);
  1587. X  }
  1588. X  
  1589. X! #endif /* OVLB */
  1590. X*** src/Old/mkroom.c    Mon Feb 19 20:31:44 1990
  1591. X--- src/mkroom.c    Sun Feb  4 09:46:57 1990
  1592. X***************
  1593. X*** 11,33 ****
  1594. X   *    dist2() -- Euclidean square-of-distance function
  1595. X   *    courtmon() -- generate a court monster
  1596. X   */
  1597. X  #include "hack.h"
  1598. X  
  1599. X! static void mkshop(), mkzoo(), mkswamp();
  1600. X  #ifdef ORACLE
  1601. X! static void mkdelphi();
  1602. X  #endif
  1603. X  #if defined(ALTARS) && defined(THEOLOGY)
  1604. X! static void mktemple();
  1605. X  #endif
  1606. X  
  1607. X! static struct permonst *morguemon();
  1608. X  #ifdef ARMY
  1609. X! static struct permonst *squadmon();
  1610. X  #endif
  1611. X  
  1612. X  #define sq(x) ((x)*(x))
  1613. X  
  1614. X  static boolean
  1615. X  isbig(sroom)
  1616. X  register struct mkroom *sroom;
  1617. X--- 11,38 ----
  1618. X   *    dist2() -- Euclidean square-of-distance function
  1619. X   *    courtmon() -- generate a court monster
  1620. X   */
  1621. X+ 
  1622. X+ #define MONATTK_H    /* comment line for pre-compiled headers */
  1623. X+ /* block some unused #defines to avoid overloading some cpp's */
  1624. X  #include "hack.h"
  1625. X  
  1626. X! static void NDECL(mkshop), FDECL(mkzoo,(int)), NDECL(mkswamp);
  1627. X  #ifdef ORACLE
  1628. X! static void NDECL(mkdelphi);
  1629. X  #endif
  1630. X  #if defined(ALTARS) && defined(THEOLOGY)
  1631. X! static void NDECL(mktemple);
  1632. X  #endif
  1633. X  
  1634. X! static struct permonst * NDECL(morguemon);
  1635. X  #ifdef ARMY
  1636. X! static struct permonst * NDECL(squadmon);
  1637. X  #endif
  1638. X  
  1639. X  #define sq(x) ((x)*(x))
  1640. X  
  1641. X+ #ifdef OVLB
  1642. X+ 
  1643. X  static boolean
  1644. X  isbig(sroom)
  1645. X  register struct mkroom *sroom;
  1646. X***************
  1647. X*** 69,75 ****
  1648. X--- 74,84 ----
  1649. X      register struct mkroom *sroom;
  1650. X      int i = -1;
  1651. X  #ifdef WIZARD
  1652. X+ # ifdef __GNULINT__
  1653. X+     register char *ep = (char *)0;
  1654. X+ # else
  1655. X      register char *ep;
  1656. X+ # endif
  1657. X  
  1658. X      /* first determine shoptype */
  1659. X      if(wizard){
  1660. X***************
  1661. X*** 192,197 ****
  1662. X--- 201,210 ----
  1663. X      sroom->rtype = type;
  1664. X      sh = sroom->fdoor;
  1665. X      switch(type) {
  1666. X+ #ifdef __GNULINT__
  1667. X+         default:
  1668. X+         /* make sure tx and ty are initialized */
  1669. X+ #endif
  1670. X          case COURT:
  1671. X          tx = somex(sroom); ty = somey(sroom); break;
  1672. X          /* TODO: try to ensure the enthroned monster is an M2_PRINCE */
  1673. X***************
  1674. X*** 332,343 ****
  1675. X      oracl->mpeaceful = 1;
  1676. X  
  1677. X      yy -= dy;
  1678. X!     if(ACCESSIBLE(levl[xx-1][yy].typ))
  1679. X!         (void) mkcorpstat(STATUE, &mons[PM_FOREST_CENTAUR], xx-1, yy);
  1680. X!     if(ACCESSIBLE(levl[xx][yy].typ))
  1681. X!         (void) mkcorpstat(STATUE, &mons[PM_MOUNTAIN_CENTAUR], xx, yy);
  1682. X!     if(ACCESSIBLE(levl[xx+1][yy].typ))
  1683. X!         (void) mkcorpstat(STATUE, &mons[PM_PLAINS_CENTAUR], xx+1, yy);
  1684. X  # ifdef FOUNTAINS
  1685. X      mkfount(0,sroom);
  1686. X  # endif
  1687. X--- 345,356 ----
  1688. X      oracl->mpeaceful = 1;
  1689. X  
  1690. X      yy -= dy;
  1691. X!     if(accessible(xx-1, yy))
  1692. X!         (void) mkcorpstat(STATUE, &mons[PM_FOREST_CENTAUR], xx-1, yy);
  1693. X!     if(accessible(xx, yy))
  1694. X!         (void) mkcorpstat(STATUE, &mons[PM_MOUNTAIN_CENTAUR], xx, yy);
  1695. X!     if(accessible(xx+1,yy))
  1696. X!         (void) mkcorpstat(STATUE, &mons[PM_PLAINS_CENTAUR], xx+1, yy);
  1697. X  # ifdef FOUNTAINS
  1698. X      mkfount(0,sroom);
  1699. X  # endif
  1700. X***************
  1701. X*** 371,378 ****
  1702. X       */
  1703. X      levl[sx][sy].typ = ALTAR;
  1704. X      levl[sx][sy].scrsym = ALTAR_SYM;
  1705. X!     levl[sx][sy].altarmask = rn2((int)A_LAW+1) | A_SHRINE;
  1706. X      priestini(dlevel, sx, sy, (int) levl[sx][sy].altarmask);
  1707. X  }
  1708. X  #endif
  1709. X  
  1710. X--- 384,392 ----
  1711. X       */
  1712. X      levl[sx][sy].typ = ALTAR;
  1713. X      levl[sx][sy].scrsym = ALTAR_SYM;
  1714. X!     levl[sx][sy].altarmask = rn2((int)A_LAW+1);
  1715. X      priestini(dlevel, sx, sy, (int) levl[sx][sy].altarmask);
  1716. X+      levl[sx][sy].altarmask |= A_SHRINE;
  1717. X  }
  1718. X  #endif
  1719. X  
  1720. X***************
  1721. X*** 405,410 ****
  1722. X--- 419,427 ----
  1723. X             sroom->ly <= yupstair && yupstair <= sroom->hy);
  1724. X  }
  1725. X  
  1726. X+ #endif /* OVLB */
  1727. X+ #ifdef OVL0
  1728. X+ 
  1729. X  int
  1730. X  dist2(x0,y0,x1,y1)
  1731. X  int x0, y0, x1, y1;
  1732. X***************
  1733. X*** 413,418 ****
  1734. X--- 430,438 ----
  1735. X      return sq(dx) + sq(dy);
  1736. X  }
  1737. X  
  1738. X+ #endif /* OVL0 */
  1739. X+ #ifdef OVLB
  1740. X+ 
  1741. X  #ifdef THRONES
  1742. X  struct permonst *
  1743. X  courtmon()
  1744. X***************
  1745. X*** 458,460 ****
  1746. X--- 478,482 ----
  1747. X      else                return((struct permonst *) 0);
  1748. X  }
  1749. X  #endif /* ARMY /* */
  1750. X+ 
  1751. X+ #endif /* OVLB */
  1752. X*** src/Old/mon.c    Mon Feb 19 20:32:07 1990
  1753. X--- src/mon.c    Fri Feb 16 22:07:48 1990
  1754. X***************
  1755. X*** 1,9 ****
  1756. X! /*    SCCS Id: @(#)mon.c    3.0    89/11/19
  1757. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  1758. X  /* NetHack may be freely redistributed.  See license for details. */
  1759. X  
  1760. X! #if (defined(MICROPORT_BUG) || !defined(LINT)) && !defined(__STDC__)
  1761. X  #define MKROOM_H
  1762. X  #endif
  1763. X  
  1764. X  #include "hack.h"
  1765. X--- 1,12 ----
  1766. X! /*    SCCS Id: @(#)mon.c    3.0    89/11/22
  1767. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  1768. X  /* NetHack may be freely redistributed.  See license for details. */
  1769. X  
  1770. X! /* Aztec C on amiga doesn't recognize defined() at this point! */
  1771. X! #ifndef AZTEC_C
  1772. X! #if defined(MICROPORT_BUG) || (!defined(LINT) && !defined(__STDC__))
  1773. X  #define MKROOM_H
  1774. X+ #endif /* Avoid the microport bug */
  1775. X  #endif
  1776. X  
  1777. X  #include "hack.h"
  1778. X***************
  1779. X*** 14,29 ****
  1780. X  #endif
  1781. X  
  1782. X  #ifdef HARD
  1783. X! static boolean restrap();
  1784. X  #  include <ctype.h>
  1785. X  #endif
  1786. X  
  1787. X  long lastwarntime;
  1788. X  int lastwarnlev;
  1789. X! static const char *warnings[] = {
  1790. X      "white", "pink", "red", "ruby", "purple", "black" };
  1791. X! struct monst *fdmon;    /* chain of dead monsters, need not be saved */
  1792. X  
  1793. X  /* Creates a monster corpse, a "special" corpse, or nothing if it doesn't
  1794. X   * leave corpses.  Monsters which leave "special" corpses should have
  1795. X   * G_NOCORPSE set in order to prevent wishing for one, finding tins of one,
  1796. X--- 17,45 ----
  1797. X  #endif
  1798. X  
  1799. X  #ifdef HARD
  1800. X! OSTATIC boolean FDECL(restrap,(struct monst *));
  1801. X! #endif
  1802. X! #ifdef INFERNO
  1803. X  #  include <ctype.h>
  1804. X  #endif
  1805. X  
  1806. X+ static struct obj *FDECL(make_corpse,(struct monst *));
  1807. X+ OSTATIC void NDECL(dmonsfree);
  1808. X+ static void FDECL(m_detach,(struct monst *));
  1809. X+ 
  1810. X+ #ifdef OVL1
  1811. X+ 
  1812. X  long lastwarntime;
  1813. X  int lastwarnlev;
  1814. X! const char *warnings[] = {
  1815. X      "white", "pink", "red", "ruby", "purple", "black" };
  1816. X! 
  1817. X! #endif /* OVL1 */
  1818. X! #ifdef OVLB
  1819. X  
  1820. X+ struct monst *fdmon;  /* chain of dead monsters, need not be saved */
  1821. X+               /* otherwise used only in priest.c */
  1822. X+ 
  1823. X  /* Creates a monster corpse, a "special" corpse, or nothing if it doesn't
  1824. X   * leave corpses.  Monsters which leave "special" corpses should have
  1825. X   * G_NOCORPSE set in order to prevent wishing for one, finding tins of one,
  1826. X***************
  1827. X*** 41,46 ****
  1828. X--- 57,72 ----
  1829. X      int x = mtmp->mx, y = mtmp->my;
  1830. X  
  1831. X      switch(monsndx(mdat)) {
  1832. X+         case PM_WHITE_UNICORN:
  1833. X+         case PM_GRAY_UNICORN:
  1834. X+         case PM_BLACK_UNICORN:
  1835. X+         (void) mksobj_at(UNICORN_HORN, x, y);
  1836. X+         goto default_1;
  1837. X+ #ifdef WORM
  1838. X+         case PM_LONG_WORM:
  1839. X+         (void) mksobj_at(WORM_TOOTH, x, y);
  1840. X+         goto default_1;
  1841. X+ #endif
  1842. X          case PM_KOBOLD_MUMMY:
  1843. X          obj = mksobj_at(MUMMY_WRAPPING, x, y); /* and fall through */
  1844. X          case PM_KOBOLD_ZOMBIE:
  1845. X***************
  1846. X*** 115,120 ****
  1847. X--- 141,147 ----
  1848. X              obj = mksobj_at(LEATHER_ARMOR, x, y);
  1849. X          break;
  1850. X  #endif
  1851. X+         default_1:
  1852. X          default:
  1853. X          if (mdat->geno & G_NOCORPSE)
  1854. X              return (struct obj *)0;
  1855. X***************
  1856. X*** 137,144 ****
  1857. X      return obj;
  1858. X  }
  1859. X  
  1860. X  
  1861. X! static void
  1862. X  dmonsfree(){
  1863. X  register struct monst *mtmp;
  1864. X      while(mtmp = fdmon){
  1865. X--- 164,173 ----
  1866. X      return obj;
  1867. X  }
  1868. X  
  1869. X+ #endif /* OVLB */
  1870. X+ #ifdef OVL2
  1871. X  
  1872. X! XSTATIC void
  1873. X  dmonsfree(){
  1874. X  register struct monst *mtmp;
  1875. X      while(mtmp = fdmon){
  1876. X***************
  1877. X*** 147,157 ****
  1878. X      }
  1879. X  }
  1880. X  
  1881. X  void
  1882. X  movemon()
  1883. X  {
  1884. X      register struct monst *mtmp;
  1885. X-     register int fr;
  1886. X  
  1887. X      warnlevel = 0;
  1888. X  
  1889. X--- 176,188 ----
  1890. X      }
  1891. X  }
  1892. X  
  1893. X+ #endif /* OVL2 */
  1894. X+ #ifdef OVL1
  1895. X+ 
  1896. X  void
  1897. X  movemon()
  1898. X  {
  1899. X      register struct monst *mtmp;
  1900. X  
  1901. X      warnlevel = 0;
  1902. X  
  1903. X***************
  1904. X*** 223,228 ****
  1905. X--- 254,261 ----
  1906. X          }
  1907. X          if(mtmp->mblinded && !--mtmp->mblinded)
  1908. X              mtmp->mcansee = 1;
  1909. X+         if(mtmp->mfrozen && !--mtmp->mfrozen)
  1910. X+             mtmp->mcanmove = 1;
  1911. X          if(mtmp->mfleetim && !--mtmp->mfleetim)
  1912. X              mtmp->mflee = 0;
  1913. X  #ifdef HARD
  1914. X***************
  1915. X*** 231,251 ****
  1916. X  #endif
  1917. X          if(mtmp->mimic) continue;
  1918. X          if(mtmp->mspeed != MSLOW || !(moves%2)){
  1919. X!             /* continue if the monster died fighting */
  1920. X!             fr = -1;
  1921. X! /* TODO:    Handle the case of the aggressor dying? */
  1922. X!             if(Conflict && !mtmp->iswiz &&
  1923. X!                /* area you can see if you're not blind */
  1924. X!                (dist(mtmp->mx,mtmp->my) < 3 ||
  1925. X!                 (levl[mtmp->mx][mtmp->my].lit &&
  1926. X!                  ((seelx <= mtmp->mx && mtmp->mx <= seehx &&
  1927. X!                    seely <= mtmp->my && mtmp->my <= seehy) ||
  1928. X!                   (seelx2 <= mtmp->mx && mtmp->mx <= seehx2 &&
  1929. X!                    seely2 <= mtmp->my && mtmp->my <= seehy2)))) &&
  1930. X!                (fr = fightm(mtmp)) == 2)
  1931. X!                 continue;
  1932. X!               if(fr<0 && dochugw(mtmp))
  1933. X!                 continue;
  1934. X          }
  1935. X          if(mtmp->mspeed == MFAST && dochugw(mtmp))
  1936. X              continue;
  1937. X--- 264,302 ----
  1938. X  #endif
  1939. X          if(mtmp->mimic) continue;
  1940. X          if(mtmp->mspeed != MSLOW || !(moves%2)){
  1941. X!         /* continue if the monster died fighting */
  1942. X!           if (Conflict && !mtmp->iswiz && mtmp->mcansee) {
  1943. X! /* Note: A couple of notes on conflict here.
  1944. X!      1. Conflict does not take effect in the first round.  Therefore, 
  1945. X!         A monster in a stepping into the area will get to swing at you.
  1946. X!      2. Conflict still works when you are invisible.  (?)
  1947. X!      3. Certain areas (namely castle) you can be in 3 "rooms" at once!
  1948. X!         Polyself into Xorn wearing ring of conflict and it can be done.
  1949. X!         This code only allows for two.  This needs to be changed if more
  1950. X!         areas (with diggable walls and > 2 rooms) are put into the game.
  1951. X! */
  1952. X!             xchar clx = 0, chx = 0, cly = 0, chy = 0,
  1953. X!               clx2 = 0, chx2 = 0, cly2 = 0, chy2 = 0;
  1954. X!             /* seelx etc. are not set if blind or blindfolded! */
  1955. X!             getcorners(&clx, &chx, &cly, &chy,
  1956. X!                    &clx2, &chx2, &cly2, &chy2);
  1957. X!             if ((dist(mtmp->mx,mtmp->my) < 3) || 
  1958. X!             /* if the monster is next to you OR */
  1959. X!              (levl[u.ux][u.uy].lit &&
  1960. X!              levl[mtmp->mx][mtmp->my].lit &&
  1961. X!             /* both you and it are lit AND */
  1962. X!              ((clx <= mtmp->mx && mtmp->mx <= chx &&
  1963. X!                cly <= mtmp->my && mtmp->my <= chy) ||
  1964. X!               (clx2 <= mtmp->mx && mtmp->mx <= chx2 &&
  1965. X!                cly2 <= mtmp->my && mtmp->my <= chy2))))
  1966. X!             /* you *could* see it (ie it can see you) */
  1967. X!               if (fightm(mtmp) != 3)
  1968. X!               /* have it fight if it choses to */
  1969. X!             continue;
  1970. X!           }
  1971. X!           if(dochugw(mtmp))
  1972. X!           /* otherwise just move the monster */
  1973. X!             continue;
  1974. X          }
  1975. X          if(mtmp->mspeed == MFAST && dochugw(mtmp))
  1976. X              continue;
  1977. X***************
  1978. X*** 262,268 ****
  1979. X          warnlevel = SIZE(warnings)-1;
  1980. X      if(!Blind && warnlevel >= 0)
  1981. X      if(warnlevel > lastwarnlev || moves > lastwarntime + 5){
  1982. X!         register char *rr;
  1983. X      
  1984. X          switch((int) (Warning & (LEFT_RING | RIGHT_RING))){
  1985. X          case LEFT_RING:
  1986. X--- 313,319 ----
  1987. X          warnlevel = SIZE(warnings)-1;
  1988. X      if(!Blind && warnlevel >= 0)
  1989. X      if(warnlevel > lastwarnlev || moves > lastwarntime + 5){
  1990. X!         register const char *rr;
  1991. X      
  1992. X          switch((int) (Warning & (LEFT_RING | RIGHT_RING))){
  1993. X          case LEFT_RING:
  1994. X***************
  1995. X*** 289,294 ****
  1996. X--- 340,348 ----
  1997. X      dmonsfree();    /* remove all dead monsters */
  1998. X  }
  1999. X  
  2000. X+ #endif /* OVL1 */
  2001. X+ #ifdef OVLB
  2002. X+ 
  2003. X  void
  2004. X  meatgold(mtmp)
  2005. X      register struct monst *mtmp;
  2006. X***************
  2007. X*** 409,414 ****
  2008. X--- 463,471 ----
  2009. X          }
  2010. X  }
  2011. X  
  2012. X+ #endif /* OVLB */
  2013. X+ #ifdef OVL0
  2014. X+ 
  2015. X  int
  2016. X  curr_mon_load(mtmp)
  2017. X  register struct monst *mtmp;
  2018. X***************
  2019. X*** 475,484 ****
  2020. X      return(TRUE);
  2021. X  }
  2022. X  
  2023. X  void
  2024. X  mpickstuff(mtmp, str)
  2025. X      register struct monst *mtmp;
  2026. X!     register char *str;
  2027. X  {
  2028. X      register struct obj *otmp;
  2029. X  
  2030. X--- 532,544 ----
  2031. X      return(TRUE);
  2032. X  }
  2033. X  
  2034. X+ #endif /* OVL0 */
  2035. X+ #ifdef OVL2
  2036. X+ 
  2037. X  void
  2038. X  mpickstuff(mtmp, str)
  2039. X      register struct monst *mtmp;
  2040. X!     register const char *str;
  2041. X  {
  2042. X      register struct obj *otmp;
  2043. X  
  2044. X***************
  2045. X*** 498,503 ****
  2046. X--- 558,566 ----
  2047. X          }
  2048. X  }
  2049. X  
  2050. X+ #endif /* OVL2 */
  2051. X+ #ifdef OVL0
  2052. X+ 
  2053. X  /* return number of acceptable neighbour positions */
  2054. X  int
  2055. X  mfndpos(mon, poss, info, flag)
  2056. X***************
  2057. X*** 532,553 ****
  2058. X          if(IS_ROCK(ntyp = levl[nx][ny].typ) && !(flag & ALLOW_WALL) &&
  2059. X          !((flag & ALLOW_DIG) && may_dig(nx,ny))) continue;
  2060. X          if(IS_DOOR(ntyp) && !amorphous(mon->data) &&
  2061. X!            ((levl[nx][ny].doormask & D_LOCKED &&
  2062. X!            !is_giant(mon->data) && !mon->isshk) ||
  2063. X!         (levl[nx][ny].doormask & D_CLOSED &&
  2064. X!            (verysmall(mon->data) ||
  2065. X!             (!is_giant(mon->data) && nohands(mon->data))))
  2066. X!            ) && !(flag & (ALLOW_WALL|ALLOW_DIG))) continue;
  2067. X          if(nx != x && ny != y &&
  2068. X  #ifdef REINCARNATION
  2069. X!            ((IS_DOOR(nowtyp) && ((levl[x][y].doormask & ~D_BROKEN)
  2070. X!             || dlevel == rogue_level)) ||
  2071. X!         (IS_DOOR(ntyp) && ((levl[nx][ny].doormask & ~D_BROKEN)
  2072. X!             || dlevel == rogue_level))))
  2073. X  #else
  2074. X             ((IS_DOOR(nowtyp) && (levl[x][y].doormask & ~D_BROKEN)) ||
  2075. X!         (IS_DOOR(ntyp) && (levl[nx][ny].doormask & ~D_BROKEN))))
  2076. X  #endif
  2077. X          continue;
  2078. X          if(is_pool(nx,ny) == wantpool || poolok) {
  2079. X          /* Displacement also displaces the Elbereth/scare monster,
  2080. X--- 595,614 ----
  2081. X          if(IS_ROCK(ntyp = levl[nx][ny].typ) && !(flag & ALLOW_WALL) &&
  2082. X          !((flag & ALLOW_DIG) && may_dig(nx,ny))) continue;
  2083. X          if(IS_DOOR(ntyp) && !amorphous(mon->data) &&
  2084. X!            ((levl[nx][ny].doormask & D_CLOSED && !(flag & OPENDOOR)) ||
  2085. X!         (levl[nx][ny].doormask & D_LOCKED && !(flag & UNLOCKDOOR))
  2086. X!            ) && !(flag & (ALLOW_WALL|ALLOW_DIG|BUSTDOOR))) continue;
  2087. X          if(nx != x && ny != y &&
  2088. X  #ifdef REINCARNATION
  2089. X!            ((IS_DOOR(nowtyp) &&
  2090. X!              ((levl[x][y].doormask & ~D_BROKEN) || dlevel == rogue_level)) ||
  2091. X!         (IS_DOOR(ntyp) &&
  2092. X!          ((levl[nx][ny].doormask & ~D_BROKEN) || dlevel == rogue_level))
  2093. X  #else
  2094. X             ((IS_DOOR(nowtyp) && (levl[x][y].doormask & ~D_BROKEN)) ||
  2095. X!         (IS_DOOR(ntyp) && (levl[nx][ny].doormask & ~D_BROKEN))
  2096. X  #endif
  2097. X+            ))
  2098. X          continue;
  2099. X          if(is_pool(nx,ny) == wantpool || poolok) {
  2100. X          /* Displacement also displaces the Elbereth/scare monster,
  2101. X***************
  2102. X*** 636,641 ****
  2103. X--- 697,705 ----
  2104. X      return(cnt);
  2105. X  }
  2106. X  
  2107. X+ #endif /* OVL0 */
  2108. X+ #ifdef OVL1
  2109. X+ 
  2110. X  int
  2111. X  dist(x, y)
  2112. X  register int x,y;
  2113. X***************
  2114. X*** 655,660 ****
  2115. X--- 719,727 ----
  2116. X      return (distance < 3);
  2117. X  }
  2118. X  
  2119. X+ #endif /* OVL1 */
  2120. X+ #ifdef OVLB
  2121. X+ 
  2122. X  static const char *poiseff[] = {
  2123. X  
  2124. X      " feel very weak", "r brain is on fire",
  2125. X***************
  2126. X*** 671,679 ****
  2127. X  }
  2128. X  
  2129. X  void
  2130. X! poisoned(string, typ, pname)
  2131. X! register char *string, *pname;
  2132. X! register int  typ;
  2133. X  {
  2134. X      register int i, plural;
  2135. X      boolean thrown_weapon = !strncmp(string, "poison", 6);
  2136. X--- 738,746 ----
  2137. X  }
  2138. X  
  2139. X  void
  2140. X! poisoned(string, typ, pname, fatal)
  2141. X! register const char *string, *pname;
  2142. X! register int  typ, fatal;
  2143. X  {
  2144. X      register int i, plural;
  2145. X      boolean thrown_weapon = !strncmp(string, "poison", 6);
  2146. X***************
  2147. X*** 699,715 ****
  2148. X          pline("The poison doesn't seem to affect you.");
  2149. X          return;
  2150. X      }
  2151. X!     i = rn2(10 + 20*thrown_weapon);
  2152. X      if(i == 0 && typ != A_CHA) {
  2153. X          u.uhp = -1;
  2154. X          pline("The poison was deadly...");
  2155. X      } else if(i <= 5) {
  2156. X!         pline("You%s!", poiseff[typ]);
  2157. X          adjattrib(typ, thrown_weapon ? -1 : -rn1(3,3), TRUE);
  2158. X      } else {
  2159. X!         losehp(thrown_weapon ? rnd(6) : rn1(10,6), pname);
  2160. X      }
  2161. X      if(u.uhp < 1) {
  2162. X          killer = pname;
  2163. X          done(POISONING);
  2164. X      }
  2165. X--- 766,783 ----
  2166. X          pline("The poison doesn't seem to affect you.");
  2167. X          return;
  2168. X      }
  2169. X!     i = rn2(fatal + 20*thrown_weapon);
  2170. X      if(i == 0 && typ != A_CHA) {
  2171. X          u.uhp = -1;
  2172. X          pline("The poison was deadly...");
  2173. X      } else if(i <= 5) {
  2174. X!         You("%s!", poiseff[typ]);
  2175. X          adjattrib(typ, thrown_weapon ? -1 : -rn1(3,3), TRUE);
  2176. X      } else {
  2177. X!         losehp(thrown_weapon ? rnd(6) : rn1(10,6), pname, KILLED_BY_AN);
  2178. X      }
  2179. X      if(u.uhp < 1) {
  2180. X+         killer_format = KILLED_BY_AN;
  2181. X          killer = pname;
  2182. X          done(POISONING);
  2183. X      }
  2184. X***************
  2185. X*** 749,755 ****
  2186. X      }
  2187. X  #endif
  2188. X      if(mtmp->isshk) shkdead(mtmp);
  2189. X-     if(mtmp->isgd) gddead();
  2190. X  #ifdef WORM
  2191. X      if(mtmp->wormno) wormdead(mtmp);
  2192. X  #endif
  2193. X--- 817,822 ----
  2194. X***************
  2195. X*** 774,780 ****
  2196. X      fmon = mtmp2;
  2197. X      if(u.ustuck == mtmp) u.ustuck = mtmp2;
  2198. X      if(mtmp2->isshk) replshk(mtmp,mtmp2);
  2199. X-     if(mtmp2->isgd) replgd(mtmp,mtmp2);
  2200. X  #ifdef WORM
  2201. X      if(mtmp2->wormno) {
  2202. X          /* Each square the worm is on has a pointer; fix them all */
  2203. X--- 841,846 ----
  2204. X***************
  2205. X*** 871,885 ****
  2206. X      if(mdat == &mons[PM_RATWERE])
  2207. X          mtmp->data = mdat = &mons[PM_WERERAT];
  2208. X  
  2209. X-     if(u.umconf) {
  2210. X-         if(!Blind) {
  2211. X-         Your("%s stop glowing %s.",
  2212. X-         makeplural(body_part(HAND)),
  2213. X-         Hallucination ? hcolor() : red);
  2214. X-         }
  2215. X-         u.umconf = 0;
  2216. X-     }
  2217. X- 
  2218. X      /* if we have killed MAXMONNO monsters of a given type, and it
  2219. X       * can be done, genocide that monster.
  2220. X       */
  2221. X--- 937,942 ----
  2222. X***************
  2223. X*** 949,966 ****
  2224. X  #endif
  2225. X                      ) return;
  2226. X  
  2227. X- #ifdef WORM
  2228. X-     if(mdat == &mons[PM_LONG_WORM]) {
  2229. X-         (void) mksobj_at(WORM_TOOTH, x, y);
  2230. X-         stackobj(fobj);
  2231. X-         newsym(x,y);
  2232. X-     }
  2233. X- #endif
  2234. X-     if(mdat->mlet == S_UNICORN) {
  2235. X-         (void) mksobj_at(UNICORN_HORN, x, y);
  2236. X-         stackobj(fobj);
  2237. X-         newsym(x,y);
  2238. X-     }
  2239. X  #ifdef MAIL
  2240. X      if(mdat == &mons[PM_MAIL_DAEMON]) {
  2241. X          (void) mksobj_at(SCR_MAIL, x, y);
  2242. X--- 1006,1011 ----
  2243. X***************
  2244. X*** 968,976 ****
  2245. X          newsym(x,y);
  2246. X      }
  2247. X  #endif
  2248. X!     if(!ACCESSIBLE(levl[x][y].typ) ||
  2249. X!        (IS_DOOR(levl[x][y].typ) &&
  2250. X!         levl[x][y].doormask & (D_CLOSED | D_LOCKED))) {
  2251. X          /* might be mimic in wall or dead eel*/
  2252. X           newsym(x,y);
  2253. X      } else if(x != u.ux || y != u.uy) {
  2254. X--- 1013,1019 ----
  2255. X          newsym(x,y);
  2256. X      }
  2257. X  #endif
  2258. X!     if(!accessible(x, y)) {
  2259. X          /* might be mimic in wall or dead eel*/
  2260. X           newsym(x,y);
  2261. X      } else if(x != u.ux || y != u.uy) {
  2262. X***************
  2263. X*** 1050,1055 ****
  2264. X--- 1093,1099 ----
  2265. X  {
  2266. X      register int mhp, hpn, hpd;
  2267. X      int tryct;
  2268. X+        struct permonst *olddata = mtmp->data;
  2269. X  
  2270. X      /* mdat = 0 -> caller wants a random monster shape */
  2271. X      tryct = 0;
  2272. X***************
  2273. X*** 1109,1119 ****
  2274. X      if (u.ustuck == mtmp) {
  2275. X          if(u.uswallow) {
  2276. X              if(!attacktype(mdat,AT_ENGL)) {
  2277. X!                 /* cf. digging out of monster with wand */
  2278. X!                 You("break out of %s's stomach!",
  2279. X!                     mon_nam(mtmp));
  2280. X!                 mtmp->mhp = 1;    /* almost dead */
  2281. X!                 regurgitates(mtmp);
  2282. X              }
  2283. X          } else {
  2284. X              if(!sticks(mdat)
  2285. X--- 1153,1168 ----
  2286. X      if (u.ustuck == mtmp) {
  2287. X          if(u.uswallow) {
  2288. X              if(!attacktype(mdat,AT_ENGL)) {
  2289. X!                 /* Does mdat care? */
  2290. X!                 if (!noncorporeal(mdat) && !amorphous(mdat) && 
  2291. X!                     !is_whirly(mdat) && 
  2292. X!                     (mdat != &mons[PM_YELLOW_LIGHT])) {
  2293. X!                     You("break out of %s%s!", mon_nam(mtmp),
  2294. X!                         (is_animal(mdat)? 
  2295. X!                         "'s stomach" : ""));
  2296. X!                     mtmp->mhp = 1;  /* almost dead */
  2297. X!                 }
  2298. X!                 expels(mtmp, olddata, FALSE);
  2299. X              }
  2300. X          } else {
  2301. X              if(!sticks(mdat)
  2302. X***************
  2303. X*** 1164,1169 ****
  2304. X--- 1213,1221 ----
  2305. X      set_apparxy(mtmp);
  2306. X  }
  2307. X  
  2308. X+ #endif /* OVLB */
  2309. X+ #ifdef OVL2
  2310. X+ 
  2311. X  void
  2312. X  setmangry(mtmp)
  2313. X      register struct monst *mtmp;
  2314. X***************
  2315. X*** 1210,1216 ****
  2316. X  }
  2317. X  
  2318. X  #ifdef HARD
  2319. X! static boolean
  2320. X  restrap(mtmp)
  2321. X  /* unwatched hiders may hide again,
  2322. X   * if so, a 1 is returned.
  2323. X--- 1262,1268 ----
  2324. X  }
  2325. X  
  2326. X  #ifdef HARD
  2327. X! XSTATIC boolean
  2328. X  restrap(mtmp)
  2329. X  /* unwatched hiders may hide again,
  2330. X   * if so, a 1 is returned.
  2331. X***************
  2332. X*** 1237,1242 ****
  2333. X--- 1289,1297 ----
  2334. X  }
  2335. X  #endif
  2336. X  
  2337. X+ #endif /* OVL2 */
  2338. X+ #ifdef OVLB
  2339. X+ 
  2340. X  /* drop (perhaps) a cadaver and remove monster */
  2341. X  void
  2342. X  mondied(mdef)
  2343. X***************
  2344. X*** 1276,1282 ****
  2345. X  {
  2346. X      struct obj *otmp;
  2347. X  
  2348. X!     if(mdef->data->msize > MZ_TINY ||
  2349. X         !rn2(2 + ((mdef->data->geno & G_FREQ) > 2))) {
  2350. X          otmp = mk_named_object(STATUE, mdef->data, mdef->mx, mdef->my,
  2351. X              NAME(mdef), (int)mdef->mnamelth);
  2352. X--- 1331,1337 ----
  2353. X  {
  2354. X      struct obj *otmp;
  2355. X  
  2356. X!     if((int)mdef->data->msize > MZ_TINY ||
  2357. X         !rn2(2 + ((mdef->data->geno & G_FREQ) > 2))) {
  2358. X          otmp = mk_named_object(STATUE, mdef->data, mdef->mx, mdef->my,
  2359. X              NAME(mdef), (int)mdef->mnamelth);
  2360. X***************
  2361. X*** 1331,1333 ****
  2362. X--- 1386,1390 ----
  2363. X      }
  2364. X  }
  2365. X  #endif /* GOLEMS */
  2366. X+ 
  2367. X+ #endif /* OVLB */
  2368. X
  2369. END_OF_FILE
  2370. if test 55515 -ne `wc -c <'patch7.11'`; then
  2371.     echo shar: \"'patch7.11'\" unpacked with wrong size!
  2372. fi
  2373. # end of 'patch7.11'
  2374. echo shar: End of archive 10 \(of 30\).
  2375. cp /dev/null ark10isdone
  2376. MISSING=""
  2377. for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 ; do
  2378.     if test ! -f ark${I}isdone ; then
  2379.     MISSING="${MISSING} ${I}"
  2380.     fi
  2381. done
  2382. if test "${MISSING}" = "" ; then
  2383.     echo You have unpacked all 30 archives.
  2384.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  2385. else
  2386.     echo You still need to unpack the following archives:
  2387.     echo "        " ${MISSING}
  2388. fi
  2389. ##  End of shell archive.
  2390. exit 0
  2391.